protected class CacheManager.CacheTransactionHandle extends Object
Modifier and Type | Field and Description |
---|---|
protected 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 HashMap |
cacheKeyReadLocks
This is the set of cache key read locks that are currently held by this transaction.
|
protected 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 HashMap |
objectHash
This is the object hash (key is the description object, value is the stored object).
|
protected CacheManager.CacheTransactionHandle |
parentTransaction |
Constructor and Description |
---|
CacheManager.CacheTransactionHandle(CacheManager.CacheTransactionHandle parentTransaction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
Object |
lookupObject(ICacheDescription descriptionObject)
Look for an object in cache.
|
void |
saveObject(ICacheDescription descriptionObject,
Object object,
StringSet cacheKeys)
Save an object in cache.
|
protected CacheManager.CacheTransactionHandle parentTransaction
protected HashMap objectHash
protected HashMap cacheKeyMap
protected HashMap cacheKeyReadLocks
protected HashMap cacheKeyWriteLocks
protected StringSetBuffer invalidationKeys
public CacheManager.CacheTransactionHandle(CacheManager.CacheTransactionHandle parentTransaction)
parentTransaction
- is the parent transaction identifier, or null if none.public CacheManager.CacheTransactionHandle getParentTransaction()
public StringSet getWriteLocks()
public StringSet getReadLocks()
public StringSet getInvalidationKeys()
public Object lookupObject(ICacheDescription descriptionObject)
descriptionObject
- is the cache description object.public void saveObject(ICacheDescription descriptionObject, 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 Iterator getCurrentObjects()