public class TimeKeyManager extends Object implements ITimeKeyManager
| Modifier and Type | Method and Description |
|---|---|
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).
|
public Set<Long> getHeldKeys()
ITimeKeyManagergetHeldKeys in interface ITimeKeyManagerpublic String getHeldKeysStr()
ITimeKeyManagergetHeldKeysStr in interface ITimeKeyManagerpublic static TimeKeyManager get()
public boolean isLocked(TimeKey key)
ITimeKeyManagerisLocked in interface ITimeKeyManagerpublic boolean isLocked(long time)
ITimeKeyManagerisLocked in interface ITimeKeyManagerpublic void unlock(long key)
throws TimeKeyNotLockedException
ITimeKeyManagerunlock in interface ITimeKeyManagerTimeKeyNotLockedExceptionpublic void unlockAll(long key)
throws TimeKeyNotLockedException
ITimeKeyManagerunlockAll in interface ITimeKeyManagerTimeKeyNotLockedExceptionpublic void lock(long key)
ITimeKeyManagerlock in interface ITimeKeyManagerpublic void unlockAll()
ITimeKeyManagerunlockAll in interface ITimeKeyManagerCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.