|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.manifoldcf.core.cachemanager.CacheManager.CacheTransactionHandle
protected class CacheManager.CacheTransactionHandle
This is the class the cache manager uses to keep track of transaction relationships and data. Since a transaction is local to a thread, this class is local to a specific thread as well; it is thus referenced by a thread-local hash table.
| Field Summary | |
|---|---|
protected java.util.HashMap |
cacheKeyMap
This is the cache key map (key is the cache key, value is a hashmap containing the object descriptions to be invalidated). |
protected java.util.HashMap |
cacheKeyReadLocks
This is the set of cache key read locks that are currently held by this transaction. |
protected java.util.HashMap |
cacheKeyWriteLocks
This is the set of cache key write locks that are currently held by this transaction. |
protected StringSetBuffer |
invalidationKeys
This is the current set of keys to invalidate if the transaction should be committed. |
protected java.util.HashMap |
objectHash
This is the object hash (key is the description object, value is the stored object). |
protected CacheManager.CacheTransactionHandle |
parentTransaction
|
| Constructor Summary | |
|---|---|
CacheManager.CacheTransactionHandle(CacheManager.CacheTransactionHandle parentTransaction)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addLocks(StringSet thrownReadLocks,
StringSet thrownWriteLocks)
Add to the set of locks that are open. |
boolean |
checkCacheKeys(StringSet cacheKeys)
See if cache keys intersect with invalidation keys. |
java.util.Iterator |
getCurrentObjects()
Get all existing object descriptions. |
StringSet |
getInvalidationKeys()
Get the current invalidation keys. |
CacheManager.CacheTransactionHandle |
getParentTransaction()
Get parent transaction. |
StringSet |
getReadLocks()
Get the set of read locks to close on exit from this transaction. |
StringSet |
getRemainingReadLocks(StringSet cacheKeys,
StringSet keys)
Come up with the set of read locks we still need to throw. |
StringSet |
getRemainingWriteLocks(StringSet cacheKeys,
StringSet keys)
Come up with the set of write locks we still need to throw. |
StringSet |
getWriteLocks()
Get the set of write locks to close on exit from this transaction. |
void |
invalidateKeys(StringSet keys)
Invalidate objects. |
java.lang.Object |
lookupObject(ICacheDescription descriptionObject)
Look for an object in cache. |
void |
saveObject(ICacheDescription descriptionObject,
java.lang.Object object,
StringSet cacheKeys)
Save an object in cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CacheManager.CacheTransactionHandle parentTransaction
protected java.util.HashMap objectHash
protected java.util.HashMap cacheKeyMap
protected java.util.HashMap cacheKeyReadLocks
protected java.util.HashMap cacheKeyWriteLocks
protected StringSetBuffer invalidationKeys
| Constructor Detail |
|---|
public CacheManager.CacheTransactionHandle(CacheManager.CacheTransactionHandle parentTransaction)
parentTransaction - is the parent transaction identifier, or null if none.| Method Detail |
|---|
public CacheManager.CacheTransactionHandle getParentTransaction()
public StringSet getWriteLocks()
public StringSet getReadLocks()
public StringSet getInvalidationKeys()
public java.lang.Object lookupObject(ICacheDescription descriptionObject)
descriptionObject - is the cache description object.
public void saveObject(ICacheDescription descriptionObject,
java.lang.Object object,
StringSet cacheKeys)
descriptionObject - is the description.object - is the object to save.cacheKeys - are the cache keys.public void invalidateKeys(StringSet keys)
keys - is the set of keys to invalidate.public boolean checkCacheKeys(StringSet cacheKeys)
cacheKeys - is the set of cache keys that describe an object.
public StringSet getRemainingReadLocks(StringSet cacheKeys,
StringSet keys)
cacheKeys - is the set of cache keys we need to have read locks for.keys - is the set of invalidation keys we need to have write locks for.
public StringSet getRemainingWriteLocks(StringSet cacheKeys,
StringSet keys)
throws ManifoldCFException
cacheKeys - is the set of cache keys we need to have read locks for.keys - is the set of invalidation keys we need to have write locks for.
ManifoldCFException
public void addLocks(StringSet thrownReadLocks,
StringSet thrownWriteLocks)
thrownReadLocks - is the set of read locks.thrownWriteLocks - is the set of write locks.public java.util.Iterator getCurrentObjects()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||