|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.messaging.core.util.Lockable
A simple wrapper around a ReentrantLock that provides a locking mechanism to subclasses.
Constructor Summary | |
Lockable()
|
Method Summary | |
void |
lock()
The thread calling this method acquires a reentrant lock on the current instance. |
boolean |
lock(long millisecs)
The thread calling attempts to acquire the reentrant lock for the specified time. |
void |
unlock()
The thread calling it gives up the lock on the current instance, if any. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Lockable()
Method Detail |
public final void lock()
public final boolean lock(long millisecs)
public final void unlock()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |