public final class UncommittedResolvedAclCache extends Cache
Unlike the committed Resolved ACL cache maintained by S_LibraryService (which shares Resolved ACLs across all sessions for that service), an UncommittedResolvedAclCache provides a session-wise transaction-aware Resolved ACL cache.
Modifier and Type | Field and Description |
---|---|
protected LooselyBoundedCache |
m_CommittedResolvedAclCache
The committed Resolved ACL cache belonging to S_LibraryService.
|
protected Vector |
m_Frames
The uncommitted Resolved ACL frames (one for each savepoint).
|
protected long |
m_HitCount
The number of cache hits.
|
protected long |
m_MissCount
The number of cache misses.
|
protected long |
m_PutCount
The number of cache puts.
|
protected long |
m_RemoveCount
The number of cache removes.
|
protected S_LibrarySession |
m_Session
The session to which this UncommittedResolvedAclCache belongs.
|
m_Configuration
Constructor and Description |
---|
UncommittedResolvedAclCache(UncommittedResolvedAclCacheConfiguration configuration)
Constructs an uncommitted Resolved ACL cache.
|
Modifier and Type | Method and Description |
---|---|
protected void |
abortTransaction(Transaction transaction)
Handles the cache implications of aborting a transaction.
|
protected void |
beginTransaction(Transaction transaction)
Handles the cache implications of beginning a new transaction.
|
protected void |
completeTransaction(Transaction transaction)
Handles the cache implications of completing a transaction.
|
void |
dispose()
Disposes this cache.
|
Object |
find(Object id)
Gets an item from this cache.
|
AccessControlListResolver |
findOrConstruct(Long id)
Gets an item from this cache.
|
CachePerformance |
getCachePerformance()
Gets the performance information for this cache.
|
void |
invalidateAllUncommittedFrames(Long id)
Invalidate (i.e. make shallow) the ACL resolvers for the
specified Id in all frames.
|
protected void |
markDirty(Long id)
Marks the specified Resolved ACL as being "dirty".
|
void |
put(Object id,
AccessControlListResolver aclr)
Puts an item in this cache.
|
void |
put(Object id,
Object value)
Puts an item in this cache.
|
void |
remove(Object id)
Removes an item from this cache.
|
void |
reset()
Resets this cache.
|
void |
resetCachePerformance()
Resets the performance information for this cache.
|
void |
setCacheConfiguration(CacheConfiguration configuration)
Alters the configuration of this cache.
|
getCacheConfiguration, getElements
protected S_LibrarySession m_Session
protected LooselyBoundedCache m_CommittedResolvedAclCache
protected Vector m_Frames
protected long m_HitCount
protected long m_MissCount
protected long m_PutCount
protected long m_RemoveCount
public UncommittedResolvedAclCache(UncommittedResolvedAclCacheConfiguration configuration) throws IfsException
configuration
- the configuration paramaters for the new cacheIfsException
- if the operation failspublic final void setCacheConfiguration(CacheConfiguration configuration) throws IfsException
No configuration parameters of an UncommittedResolvedAclCache are updateable. Consequently, this method is a no-op.
setCacheConfiguration
in class Cache
configuration
- the configuration parametersIfsException
- if the operation failspublic final void put(Object id, Object value) throws IfsException
put
in class Cache
id
- the item idvalue
- the itemIfsException
- if operation failspublic final void put(Object id, AccessControlListResolver aclr) throws IfsException
id
- the item idaclr
- the AccessControlListResolverIfsException
- if operation failspublic final void remove(Object id) throws IfsException
remove
in class Cache
id
- the item idIfsException
- if operation failspublic final Object find(Object id) throws IfsException
find
in class Cache
id
- the item idIfsException
- if operation failspublic final AccessControlListResolver findOrConstruct(Long id) throws IfsException
id
- the item idIfsException
- if operation failspublic final CachePerformance getCachePerformance()
getCachePerformance
in class Cache
public final void resetCachePerformance()
resetCachePerformance
in class Cache
public void reset()
This causes the cache to be emptied and its performance information to be reset.
public void dispose()
After the cache is disposed, it is invalid to use this cache.
protected final void markDirty(Long id) throws IfsException
id
- the ACL idIfsException
- if the operation failspublic final void invalidateAllUncommittedFrames(Long id) throws IfsException
id
- the item idIfsException
- if operation failsprotected final void beginTransaction(Transaction transaction) throws IfsException
transaction
- the new transactionIfsException
- if the operation failsprotected final void abortTransaction(Transaction transaction) throws IfsException
transaction
- the transactionIfsException
- if the operation failsprotected final void completeTransaction(Transaction transaction) throws IfsException
transaction
- the transactionIfsException
- if the operation failsCopyright © 2023. All rights reserved.