java.lang.Object
coneforest.psylla.core.PsyLock
- All Implemented Interfaces:
PsyObject
The representation of
lock.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of theconditionoperator.static final ContextActionContext action of thelockoperator.Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Field Details
-
PSY_CONDITION
Context action of theconditionoperator. -
PSY_LOCK
Context action of thelockoperator.
-
-
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:
trueif current context holds this lock andfalseotherwise.
-
psyCondition
Returns aconditionobject for use with this lock.- Returns:
- a
conditionobject.
-