Package org.tmatesoft.sqljet.core
Interface ISqlJetMutex
- All Known Implementing Classes:
SqlJetEmptyMutex
,SqlJetMutex
public interface ISqlJetMutex
Mutex interface. SQLJet may have different implementations of mutexes.
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Method Summary
-
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.
-