|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LockManager
An interface to deal with all aspects of acquiring and releasing locks for cache entries.
| Method Summary | |
|---|---|
int |
getNumberOfLocksHeld()
Retrieves the number of locks currently held. |
Object |
getOwner(Object key)
Retrieves the write lock owner, if any, for the specified cache entry. |
boolean |
isLocked(Object key)
Returns true if the cache entry is locked (either for reading or writing) by anyone, and false otherwise. |
boolean |
lockAndRecord(Object key,
InvocationContext ctx)
Acquires a lock of type lockType, on a specific entry in the cache. |
boolean |
ownsLock(Object key,
Object owner)
Tests whether a given owner owns a lock of lockType on a particular cache entry. |
boolean |
possiblyLocked(CacheEntry entry)
Inspects the entry for signs that it is possibly locked, and hence would need to be unlocked. |
String |
printLockInfo()
Prints lock information for all locks. |
void |
releaseLocks(InvocationContext ctx)
Cleanups the locks within the given context. |
void |
unlock(InvocationContext ctx)
Releases locks present in an invocation context and transaction entry, if one is available. |
void |
unlock(Object key)
Releases the lock passed in, held by the specified owner |
| Method Detail |
|---|
boolean lockAndRecord(Object key,
InvocationContext ctx)
throws InterruptedException
Configuration.getLockAcquisitionTimeout().
key - key to lockctx - invocation context associated with this invocation
InterruptedException - if interruptedvoid unlock(Object key)
owner - lock ownervoid unlock(InvocationContext ctx)
ctx - invocation context to inspect
boolean ownsLock(Object key,
Object owner)
owner - owner
boolean isLocked(Object key)
Object getOwner(Object key)
String printLockInfo()
boolean possiblyLocked(CacheEntry entry)
entry - entry to inspect
void releaseLocks(InvocationContext ctx)
int getNumberOfLocksHeld()
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||