com.orientechnologies.jdo
Class oCacheManager

java.lang.Object
  extended bycom.orientechnologies.jdo.oCacheManager
All Implemented Interfaces:
java.io.Serializable

public class oCacheManager
extends java.lang.Object
implements java.io.Serializable

Handle the cache for persistent objects. The cache is resident in the client side and handle locking of objects between client and Dynamic Server component (in the Enterprise Edition) and between PersistenceManagers. It works as Singleton, instanced at startup.

NOTE: Internal use only, JDO Applications must not use this class directly.

See Also:
Serialized Form

Field Summary
static int OCACHE_ALLUSED
           
static int OCACHE_DEFAULTSIZE
           
static int OCACHE_ONLYPINNED
           
 
Constructor Summary
protected oCacheManager()
           
 
Method Summary
 void addAvailableObject(oOID iOid, oBinary iObject, boolean iPinned)
           
 void addObject(oOID iOid, oBinary iObject, boolean iPinned, oTransaction iTx)
           
 void close()
           
static void createInstance()
           
static void destroyInstance()
           
 java.util.HashMap getActiveItems()
           
 int getCachePolicy()
           
static oCacheManager getInstance()
           
 java.util.HashMap getPinnedItems()
           
 java.util.ArrayList getPinnedPriority()
           
 int getSize()
           
 java.util.HashMap getUnpinnedItems()
           
 java.util.ArrayList getUnpinnedPriority()
           
 void lockObject(oOID iOid, oTransaction iTx)
           
 void releaseObjectsOfDatabase(short iDbId, oTransaction iTx)
           
 void releaseObjectsOfTransaction(oTransaction iTx)
           
 void removeObject(oOID iOid, oTransaction iTx)
           
 oBinary requestObject(oOID iOid, oTransaction iTx)
           
 void setCachePolicy(int iPolicy)
           
 void updateObject(oOID iOid, oBinary iObject, oTransaction iTx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OCACHE_DEFAULTSIZE

public static final int OCACHE_DEFAULTSIZE
See Also:
Constant Field Values

OCACHE_ONLYPINNED

public static final int OCACHE_ONLYPINNED
See Also:
Constant Field Values

OCACHE_ALLUSED

public static final int OCACHE_ALLUSED
See Also:
Constant Field Values
Constructor Detail

oCacheManager

protected oCacheManager()
Method Detail

close

public void close()

getSize

public int getSize()

setCachePolicy

public void setCachePolicy(int iPolicy)

getCachePolicy

public int getCachePolicy()

addObject

public void addObject(oOID iOid,
                      oBinary iObject,
                      boolean iPinned,
                      oTransaction iTx)

addAvailableObject

public void addAvailableObject(oOID iOid,
                               oBinary iObject,
                               boolean iPinned)

updateObject

public void updateObject(oOID iOid,
                         oBinary iObject,
                         oTransaction iTx)
                  throws oObjectNotUpdatedException,
                         oObjectNotFoundException
Throws:
oObjectNotUpdatedException
oObjectNotFoundException

requestObject

public oBinary requestObject(oOID iOid,
                             oTransaction iTx)
                      throws oObjectLockedException,
                             oObjectNotInsertedException
Throws:
oObjectLockedException
oObjectNotInsertedException

lockObject

public void lockObject(oOID iOid,
                       oTransaction iTx)
                throws oObjectLockedException,
                       oObjectNotLockedException,
                       oObjectNotFoundException
Throws:
oObjectLockedException
oObjectNotLockedException
oObjectNotFoundException

removeObject

public void removeObject(oOID iOid,
                         oTransaction iTx)
                  throws oObjectNotReleasedException,
                         oObjectNotFoundException
Throws:
oObjectNotReleasedException
oObjectNotFoundException

releaseObjectsOfDatabase

public void releaseObjectsOfDatabase(short iDbId,
                                     oTransaction iTx)

releaseObjectsOfTransaction

public void releaseObjectsOfTransaction(oTransaction iTx)

createInstance

public static void createInstance()

destroyInstance

public static void destroyInstance()

getInstance

public static oCacheManager getInstance()

getActiveItems

public java.util.HashMap getActiveItems()

getPinnedItems

public java.util.HashMap getPinnedItems()

getPinnedPriority

public java.util.ArrayList getPinnedPriority()

getUnpinnedPriority

public java.util.ArrayList getUnpinnedPriority()

getUnpinnedItems

public java.util.HashMap getUnpinnedItems()