org.objectweb.carol.rmi.jrmp.server
Class JLocalObjectStore

java.lang.Object
  extended byorg.objectweb.carol.rmi.jrmp.server.JLocalObjectStore

public class JLocalObjectStore
extends java.lang.Object

The class is a naming context allocating integer identifier. This integer value is divided in two parts in order to reduce the synchronizaion conflicts. The 8 (MAX_SIZE constant) right bits are used to hash identifiers. The null value are stored with a special identifier: -1

Author:
riviereg, sebastien chassande-barrioz

Field Summary
static java.util.ArrayList[] lists
           
 
Constructor Summary
JLocalObjectStore()
           
 
Method Summary
static java.lang.Object getObject(int key)
          lookup an object by its integer identifier.
static java.lang.Object removeObject(int key)
          Unexport an object from the NamingContext.
static int storeObject(java.lang.Object ob)
          Exports an object and allocates an integer identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lists

public static java.util.ArrayList[] lists
Constructor Detail

JLocalObjectStore

public JLocalObjectStore()
Method Detail

storeObject

public static int storeObject(java.lang.Object ob)
Exports an object and allocates an integer identifier.


getObject

public static java.lang.Object getObject(int key)
lookup an object by its integer identifier.

Parameters:
key - is the object identifier
Returns:
the Object associated to the identifier, or a null value if no object was found.

removeObject

public static java.lang.Object removeObject(int key)
Unexport an object from the NamingContext. Empty slots are full with EMPTY_SLOT.