CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.util
Class NullImplementation.NullFlatRegistry

java.lang.Object
  extended by com.tangosol.util.NullImplementation.NullFlatRegistry
Enclosing class:
NullImplementation

public static class NullImplementation.NullFlatRegistry
extends Object

A FlatRegistry that contains nothing.


Field Summary
static NullImplementation.NullFlatRegistry INSTANCE
          Since the FlatRegistry contains no information, only one ever has to exist.
 
Method Summary
 boolean equals(Object o)
           
 Entry getById(int nId)
          Get a Registry Entry by its ID.
 Entry getByName(String sName)
          Get a Registry Entry by its name.
 int getSize()
          Determine the number of Entry items that are registered.
 int hashCode()
           
 Iterator iterator()
          Obtain an Iterator of the Entry items in the registry.
 void register(Entry entry)
          Register an Entry.
 void unregister(Entry entry)
          Unregister an Entry.
 

Field Detail

INSTANCE

public static final NullImplementation.NullFlatRegistry INSTANCE
Since the FlatRegistry contains no information, only one ever has to exist.

Method Detail

getByName

public Entry getByName(String sName)
Get a Registry Entry by its name.

Parameters:
sName - the name of the Entry to get
Returns:
the Entry that is uniquely identified by the specified name, or null if no Entry is registered with that name

getById

public Entry getById(int nId)
Get a Registry Entry by its ID.

Parameters:
nId - the ID of the Entry to get
Returns:
the Entry that is uniquely identified by the specified ID, or null if no Entry is registered with that ID

getSize

public int getSize()
Determine the number of Entry items that are registered.

Returns:
the number of registered Entry items

iterator

public Iterator iterator()
Obtain an Iterator of the Entry items in the registry.

Returns:
an Iterator of Entry items

register

public void register(Entry entry)
              throws RegistryException
Register an Entry.

Parameters:
entry - an Entry object
Throws:
NullPointerException - if the passed Entry is null
RegistryException - if registration fails
DuplicateIdException - if the Entry ID is not unique
DuplicateNameException - if the Entry name is not unique
InvalidIdException - if the Entry ID is -1 and the registry does not assign IDs, or if the ID is out of range

unregister

public void unregister(Entry entry)
                throws RegistryException
Unregister an Entry.

Parameters:
entry - an Entry object
Throws:
RegistryException

equals

public boolean equals(Object o)

hashCode

public int hashCode()

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation