|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.jdo.CacheManager
public class CacheManager
CacheManager handles expiring objects from the cache. CacheManager is created from DatabaseImpl and should not be instantiated manually.
Constructor Summary | |
---|---|
CacheManager(Database db,
TransactionContext transactionContext,
LockEngine lockEngine)
Creates an instance of this class. |
Method Summary | |
---|---|
void |
dumpCache()
Dump all cached objects to log. |
void |
dumpCache(java.lang.Class cls)
Dump cached objects of specific type to log. |
void |
expireCache()
Expires all objects from cache. |
void |
expireCache(java.lang.Class[] type)
Expires all instances of specified types from cache. |
void |
expireCache(java.lang.Class type,
java.lang.Object identity)
Expires a type with a specific identity from cache. |
void |
expireCache(java.lang.Class type,
java.lang.Object[] identity)
Expires a type with specific identities from cache. |
boolean |
isCached(java.lang.Class cls,
java.lang.Object identity)
Indicates whether am instance of cls is currently cached |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheManager(Database db, TransactionContext transactionContext, LockEngine lockEngine)
db
- Database instance.transactionContext
- Active transaction context.lockEngine
- Lock engineMethod Detail |
---|
public boolean isCached(java.lang.Class cls, java.lang.Object identity) throws PersistenceException
cls
- The class type.identity
- The object identity.
PersistenceException
- If a problem occured resolving the object's cache membership.public void dumpCache()
public void dumpCache(java.lang.Class cls)
public void expireCache()
Objects expired from the cache will be read from persistent storage, as opposed to being read from the performance cache, during subsequent load/query operations.
When objects are expired from the cache individually, by identity, objects contained within a "master" object, for example objects maintained in a one-to-many relationship, will automatically be expired from the cache, without the need to explicitly identify them. This does not apply when expiring objects by type. Each type, both container and contained objects need to be specified.
public void expireCache(java.lang.Class type, java.lang.Object identity) throws PersistenceException
Objects expired from the cache will be read from persistent storage, as opposed to being read from the performance cache, during subsequent load/query operations.
When objects are expired from the cache individually, by identity, objects contained within a "master" object, for example objects maintained in a one-to-many relationship, will automatically be expired from the cache, without the need to explicitly identify them. This does not apply when expiring objects by type. Each type, both container and contained objects need to be specified.
type
- The type to expire.identity
- Identity of the object to expire.
PersistenceException
public void expireCache(java.lang.Class type, java.lang.Object[] identity) throws PersistenceException
Objects expired from the cache will be read from persistent storage, as opposed to being read from the performance cache, during subsequent load/query operations.
When objects are expired from the cache individually, by identity, objects contained within a "master" object, for example objects maintained in a one-to-many relationship, will automatically be expired from the cache, without the need to explicitly identify them. This does not apply when expiring objects by type. Each type, both container and contained objects need to be specified.
type
- The type to expire.identity
- An array of object identifiers to expire.
PersistenceException
public void expireCache(java.lang.Class[] type) throws PersistenceException
Objects expired from the cache will be read from persistent storage, as opposed to being read from the performance cache, during subsequent load/query operations.
When objects are expired from the cache individually, by identity, objects contained within a "master" object, for example objects maintained in a one-to-many relationship, will automatically be expired from the cache, without the need to explicitly identify them. This does not apply when expiring objects by type. Each type, both container and contained objects need to be specified.
type
- An array of types to expire.
PersistenceException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |