|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.geronimo.lock.ConcurrentInstanceLock
Implementation based on the use of the util.concurrent package from Doug Lea.
| Constructor Summary | |
ConcurrentInstanceLock()
|
|
| Method Summary | |
void |
exclusiveLock(Object context)
Provide context with exclusive access to this resource. |
int |
getSharedCount()
|
void |
release(Object context)
Notification from context that it no longer requires access to this resource |
void |
sharedLock(Object context)
Provide context with shared access to this resource. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConcurrentInstanceLock()
| Method Detail |
public void sharedLock(Object context)
throws InterruptedException
InstanceLock
sharedLock in interface InstanceLockcontext - the context requesting access
InterruptedException - if the thread is interrupted before receiving the lock
public void exclusiveLock(Object context)
throws InterruptedException
InstanceLock
exclusiveLock in interface InstanceLockcontext - the context requesting access
InterruptedException - if the thread is interrupted before receiving the lockpublic void release(Object context)
InstanceLock
release in interface InstanceLockcontext - the context relinguishing accesspublic int getSharedCount()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||