|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.multi.utils.timekey.TimeKeyManager
public class TimeKeyManager
Singleton class that manages timekey locks and unlocks,
Method Summary | |
---|---|
static TimeKeyManager |
get()
Get the singleton instance. |
java.util.Collection<java.lang.Long> |
getHeldKeys()
Returns an immutable collection of currently held timeKeys. |
java.lang.String |
getHeldKeysStr()
Returns an immutable collection of currently held timeKeys as string. |
boolean |
isLocked(long time)
True if the provided timeKey is explicitly locked ( lock(key) was called) |
boolean |
isLocked(TimeKey key)
True if the provided timeKey is explicitly locked ( lock(key) was called) |
void |
lock(long key)
|
void |
unlock(long key)
|
void |
unlockAll()
Unlock all keys. |
void |
unlockAll(long key)
Completely unlocks one key (regardles number of locks held). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.util.Collection<java.lang.Long> getHeldKeys()
public java.lang.String getHeldKeysStr()
public static TimeKeyManager get()
public boolean isLocked(TimeKey key)
key
-
public boolean isLocked(long time)
time
-
public void unlock(long key) throws TimeKeyNotLockedException
TimeKeyNotLockedException
public void unlockAll(long key) throws TimeKeyNotLockedException
key
-
TimeKeyNotLockedException
public void lock(long key)
public void unlockAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |