|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.datamanager.kernel.KernelMemory
This class will cooperate with SuaveEntityManger to manager the object in the memory of the knernel. It can provide the lookup capability for Entity, Proxy, Identifier. It also can find the oldest object reside in the memory
Field Summary | |
protected Map |
entityToIdentifier
A mapping from VerySimpleEntities to Identifiers. |
static int |
HASHTABLE_LENGTH
The maximum number of Entities cached in memory at a given time. |
protected Map |
identifierToEntity
A mapping from Identifiers to VerySimpleEntities. |
protected Map |
identifierToProxy
A mapping from Identifiers to EntityProxies. |
protected Map |
IdentifierToTimeStamp
|
protected TreeMap |
timeStampToIdentifier
|
Constructor Summary | |
KernelMemory()
|
Method Summary | |
int |
currentSize()
|
protected Entity |
findEntity(org.datamanager.kernel.Identifier identifier)
|
org.datamanager.kernel.Identifier |
findIdentifier(Entity entity)
|
org.datamanager.kernel.Identifier |
findOldestIdentifier()
|
protected org.datamanager.kernel.EntityProxy |
findProxy(org.datamanager.kernel.Identifier identifier)
|
boolean |
isFull()
|
void |
loadIntoMemory(org.datamanager.kernel.Identifier identifier,
Entity entity,
org.datamanager.kernel.EntityProxy entityProxy)
|
int |
maxSize()
|
Entity |
removeFromMemory(org.datamanager.kernel.Identifier identifier)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int HASHTABLE_LENGTH
protected Map entityToIdentifier
protected Map identifierToEntity
protected Map identifierToProxy
protected TreeMap timeStampToIdentifier
protected Map IdentifierToTimeStamp
Constructor Detail |
public KernelMemory()
Method Detail |
public boolean isFull()
public void loadIntoMemory(org.datamanager.kernel.Identifier identifier, Entity entity, org.datamanager.kernel.EntityProxy entityProxy) throws Exception
Exception
public org.datamanager.kernel.Identifier findOldestIdentifier()
public Entity removeFromMemory(org.datamanager.kernel.Identifier identifier)
public int currentSize()
public int maxSize()
public org.datamanager.kernel.Identifier findIdentifier(Entity entity)
protected org.datamanager.kernel.EntityProxy findProxy(org.datamanager.kernel.Identifier identifier)
protected Entity findEntity(org.datamanager.kernel.Identifier identifier)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |