Class OReadersWriterSpinLock

java.lang.Object
java.util.concurrent.locks.AbstractOwnableSynchronizer
com.orientechnologies.common.concur.lock.OReadersWriterSpinLock
All Implemented Interfaces:
Serializable

public class OReadersWriterSpinLock extends AbstractOwnableSynchronizer
Since:
8/18/14
Author:
Andrey Lomakin (a.lomakin-at-orientdb.com)
See Also:
  • Constructor Details

    • OReadersWriterSpinLock

      public OReadersWriterSpinLock()
  • Method Details

    • tryAcquireReadLock

      public boolean tryAcquireReadLock(long timeout)
      Tries to acquire lock during provided interval of time and returns either if provided time interval was passed or if lock was acquired.
      Parameters:
      timeout - Timeout during of which we should wait for read lock.
      Returns:
      true if read lock was acquired.
    • acquireReadLock

      public void acquireReadLock()
    • releaseReadLock

      public void releaseReadLock()
    • acquireWriteLock

      public void acquireWriteLock()
    • releaseWriteLock

      public void releaseWriteLock()