Class PsyLock

java.lang.Object
coneforest.psylla.core.PsyLock
All Implemented Interfaces:
PsyConvertableToName, PsyConvertableToString, PsyObject

public class PsyLock extends Object implements PsyObject
A representation of lock object.
  • Field Details

    • OPERATORS

      public static final PsyOperator[] 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 and false otherwise.
    • psyCondition

      public PsyCondition psyCondition()
      Returns a condition object for use with this lock.
      Returns:
      a condition object.