|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkieker.webgui.service.impl.utility.LockManager
public final class LockManager
This manager is responsible for locking critical code using keys. Internally we use ReentrantLock
s, but make sure that they are removed once they are no
longer needed. The manager has been developed with a simple design. If necessary, the manager can be modified in order to provide a faster access to the locks.
Constructor Summary | |
---|---|
LockManager()
Creates a new instance of this class. |
Method Summary | |
---|---|
void |
lock(String key)
Locks the object for the given key. |
void |
lock(String[] keys)
Locks the objects for the given keys in a definite order. |
void |
unlock(String key)
Unlocks the object for the given key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LockManager()
Method Detail |
---|
public void lock(String[] keys)
keys
- The keys used for the locking.public void lock(String key)
key
- The key used for the locking.public void unlock(String key)
key
- The key used for the unlocking.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |