Interface ISqlJetMutex

All Known Implementing Classes:
SqlJetEmptyMutex, SqlJetMutex

public interface ISqlJetMutex
Mutex interface. SQLJet may have different implementations of mutexes.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Locks mutex if it is unlocked and return true.
    void
    Locks mutex.
    boolean
    Check mutex locking status.
    void
    Unlocks mutex.
  • Method Details

    • enter

      void enter()
      Locks mutex. If mutex is locked then this method waits while it will unlock.
    • attempt

      boolean attempt()
      Locks mutex if it is unlocked and return true. Otherwise just return false. This method doesn't wait.
      Returns:
      true if this method locked mutex or false if mutex was already locked by other thread.
    • leave

      void leave()
      Unlocks mutex.
    • held

      boolean held()
      Check mutex locking status.
      Returns:
      true if mutex is locked or false if mutex is unlocked.