Package org.tmatesoft.sqljet.core
Interface ISqlJetMutex
-
- All Known Implementing Classes:
SqlJetEmptyMutex,SqlJetMutex
public interface ISqlJetMutexMutex interface. SQLJet may have different implementations of mutexes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanattempt()Locks mutex if it is unlocked and return true.voidenter()Locks mutex.booleanheld()Check mutex locking status.voidleave()Unlocks mutex.
-
-
-
Method Detail
-
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.
-
-