public interface ICacheManager
Modifier and Type | Method and Description |
---|---|
void |
commitTransaction(String transactionID)
Commit a cache transaction.
|
ICacheHandle |
enterCache(ICacheDescription[] locateObjectDescriptions,
StringSet invalidateKeys,
String transactionID)
Second way of doing cache management.
|
ICacheCreateHandle |
enterCreateSection(ICacheHandle handle)
Enter a creation critical section.
|
void |
expireObjects(long currentTimestamp)
Timed invalidation.
|
void |
findObjectsAndExecute(ICacheDescription[] locateObjectDescriptions,
StringSet invalidateKeys,
ICacheExecutor execObject,
String transactionID)
Locate or create a set of objects in the cached object pool, and/or destroy and invalidate
the same or other objects.
|
void |
invalidateKeys(ICacheHandle handle)
Invalidate keys.
|
void |
leaveCache(ICacheHandle handle)
Leave the cache.
|
void |
leaveCreateSection(ICacheCreateHandle handle)
Leave the create section.
|
Object |
lookupObject(ICacheCreateHandle handle,
ICacheDescription objectDescription)
Lookup an object.
|
void |
rollbackTransaction(String transactionID)
Roll back a cache transaction.
|
void |
saveObject(ICacheCreateHandle handle,
ICacheDescription objectDescription,
Object object)
Save a newly created object.
|
void |
startTransaction(String startingTransactionID,
String enclosingTransactionID)
Begin a cache transaction.
|
static final String _rcsid
void findObjectsAndExecute(ICacheDescription[] locateObjectDescriptions, StringSet invalidateKeys, ICacheExecutor execObject, String transactionID) throws ManifoldCFException
locateObjectDescriptions
- is a set of description objects that uniquely describe the objects needed.
May be null if no objects are desired.invalidateKeys
- are the keys to invalidate after successful execution. May be null.execObject
- is the cache execution object whose create() or execute() methods will
be called. May be null if no in-section logic is desired, and no objects are specified.transactionID
- is the current transaction identifier, or null. Objects created within this call
will be associated with this transaction; they will be purged from the cache should the transaction
be rolled back.ManifoldCFException
ICacheHandle enterCache(ICacheDescription[] locateObjectDescriptions, StringSet invalidateKeys, String transactionID) throws ManifoldCFException
locateObjectDescriptions
- is a set of description objects that uniquely describe the objects needed.
May be null if no objects are desired.invalidateKeys
- are the keys to invalidate after successful execution. May be null.transactionID
- is the current transaction identifier, or null. Objects created within this block
will be associated with this transaction; they will be purged from the cache should the transaction
be rolled back.ManifoldCFException
ICacheCreateHandle enterCreateSection(ICacheHandle handle) throws ManifoldCFException
handle
- is the cache handle.ManifoldCFException
Object lookupObject(ICacheCreateHandle handle, ICacheDescription objectDescription) throws ManifoldCFException
handle
- is the handle to use for the create.objectDescription
- is the description of the object to look up.ManifoldCFException
void saveObject(ICacheCreateHandle handle, ICacheDescription objectDescription, Object object) throws ManifoldCFException
handle
- is the create handle.objectDescription
- is the object description.object
- is the object.ManifoldCFException
void leaveCreateSection(ICacheCreateHandle handle) throws ManifoldCFException
handle
- is the handle created by the corresponding enterCreateSection() method.ManifoldCFException
void invalidateKeys(ICacheHandle handle) throws ManifoldCFException
handle
- is the cache handle. Does nothing if a null set of keys was passed in.ManifoldCFException
void leaveCache(ICacheHandle handle) throws ManifoldCFException
handle
- is the handle of the cache we are leaving.ManifoldCFException
void startTransaction(String startingTransactionID, String enclosingTransactionID) throws ManifoldCFException
startingTransactionID
- is the id of the transaction that is starting.enclosingTransactionID
- is the id of the transaction that is in effect, or null.ManifoldCFException
void commitTransaction(String transactionID) throws ManifoldCFException
transactionID
- is the id of the transaction that is ending.ManifoldCFException
void rollbackTransaction(String transactionID) throws ManifoldCFException
transactionID
- is the id of the transaction that is ending.ManifoldCFException
void expireObjects(long currentTimestamp) throws ManifoldCFException
currentTimestamp
- is the current time in milliseconds since epoch.ManifoldCFException