Package coneforest.psylla.core
Class PsyLock
java.lang.Object
coneforest.psylla.core.PsyLock
- All Implemented Interfaces:
PsyConvertableToName
,PsyConvertableToString
,PsyObject
A representation of
lock
object.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Field Details
-
OPERATORS
-
-
Constructor Details
-
PsyLock
public PsyLock()
-
-
Method Details
-
lock
public void lock()Acquires the lock. -
unlock
public void unlock()Releases the lock. -
isHeldByCurrentThread
public boolean isHeldByCurrentThread()Queries if this lock is held by the current thread.- Returns:
true
if current context holds this lock andfalse
otherwise.
-
psyCondition
Returns acondition
object for use with this lock.- Returns:
- a
condition
object.
-