|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.geronimo.lock.WriterPreferredInstanceLock2
Implementation of InstanceLock using a simple prefer-writer allocation policy.
Constructor Summary | |
WriterPreferredInstanceLock2()
|
Method Summary | |
void |
exclusiveLock(Object context)
Provide context with exclusive access to this resource. |
int |
getSharedCount()
|
int |
getSharedWaiting()
|
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 WriterPreferredInstanceLock2()
Method Detail |
public void sharedLock(Object context) throws InterruptedException
InstanceLock
sharedLock
in interface InstanceLock
context
- the context requesting access
InterruptedException
- if the thread is interrupted before receiving the lockpublic void exclusiveLock(Object context) throws InterruptedException
InstanceLock
exclusiveLock
in interface InstanceLock
context
- the context requesting access
InterruptedException
- if the thread is interrupted before receiving the lockpublic void release(Object context)
InstanceLock
release
in interface InstanceLock
context
- the context relinguishing accesspublic int getSharedCount()
public int getSharedWaiting()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |