Class PsyLock
java.lang.Object
coneforest.psylla.core.PsyLock
- All Implemented Interfaces:
PsyObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of theconditionoperator.static final ContextActionContext action of thelockoperator.Fields inherited from interface PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, 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 for use with this lock
-