Class SqlJetMutex

  • All Implemented Interfaces:
    ISqlJetMutex

    public class SqlJetMutex
    extends java.lang.Object
    implements ISqlJetMutex
    Author:
    TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
    • Constructor Summary

      Constructors 
      Constructor Description
      SqlJetMutex()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean attempt()
      Locks mutex if it is unlocked and return true.
      void enter()
      Locks mutex.
      boolean held()
      Check mutex locking status.
      void leave()
      Unlocks mutex.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SqlJetMutex

        public SqlJetMutex()
    • Method Detail

      • attempt

        public boolean attempt()
        Description copied from interface: ISqlJetMutex
        Locks mutex if it is unlocked and return true. Otherwise just return false. This method doesn't wait.
        Specified by:
        attempt in interface ISqlJetMutex
        Returns:
        true if this method locked mutex or false if mutex was already locked by other thread.
      • enter

        public void enter()
        Description copied from interface: ISqlJetMutex
        Locks mutex. If mutex is locked then this method waits while it will unlock.
        Specified by:
        enter in interface ISqlJetMutex
      • held

        public boolean held()
        Description copied from interface: ISqlJetMutex
        Check mutex locking status.
        Specified by:
        held in interface ISqlJetMutex
        Returns:
        true if mutex is locked or false if mutex is unlocked.