|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.multi.utils.timekey.TimeKeyManager
public class TimeKeyManager
Singleton class that manages timekey locks and unlocks,
| Method Summary | |
|---|---|
static TimeKeyManager |
get()
|
Set<Long> |
getHeldKeys()
Returns an immutable collection of currently held timeKeys. |
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)
Locks some "time" (or increment lock number if existing lock exists). |
void |
unlock(long key)
Unlocks some "time". |
void |
unlockAll()
Unlock all times. |
void |
unlockAll(long key)
Completely unlocks one time (regardless 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 Set<Long> getHeldKeys()
ITimeKeyManager
getHeldKeys in interface ITimeKeyManagerpublic String getHeldKeysStr()
ITimeKeyManager
getHeldKeysStr in interface ITimeKeyManagerpublic static TimeKeyManager get()
public boolean isLocked(TimeKey key)
ITimeKeyManager
isLocked in interface ITimeKeyManagerpublic boolean isLocked(long time)
ITimeKeyManager
isLocked in interface ITimeKeyManager
public void unlock(long key)
throws TimeKeyNotLockedException
ITimeKeyManager
unlock in interface ITimeKeyManagerTimeKeyNotLockedException
public void unlockAll(long key)
throws TimeKeyNotLockedException
ITimeKeyManager
unlockAll in interface ITimeKeyManagerTimeKeyNotLockedExceptionpublic void lock(long key)
ITimeKeyManager
lock in interface ITimeKeyManagerpublic void unlockAll()
ITimeKeyManager
unlockAll in interface ITimeKeyManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||