org.objectweb.carol.rmi.jrmp.server

Class 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 ArrayList[]
lists

Method Summary

static Object
getObject(int key)
lookup an object by its integer identifier.
static Object
removeObject(int key)
Unexport an object from the NamingContext.
static int
storeObject(Object ob)
Exports an object and allocates an integer identifier.

Field Details

lists

public static ArrayList[] lists

Method Details

getObject

public static 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 Object removeObject(int key)
Unexport an object from the NamingContext. Empty slots are full with EMPTY_SLOT.


storeObject

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