Class SqlJetEmptyMutex
java.lang.Object
org.tmatesoft.sqljet.core.internal.mutex.SqlJetEmptyMutex
- All Implemented Interfaces:
ISqlJetMutex
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SqlJetEmptyMutex
public SqlJetEmptyMutex()
-
-
Method Details
-
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 interfaceISqlJetMutex
- 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 interfaceISqlJetMutex
-
held
public boolean held()Description copied from interface:ISqlJetMutex
Check mutex locking status.- Specified by:
held
in interfaceISqlJetMutex
- Returns:
- true if mutex is locked or false if mutex is unlocked.
-
leave
public void leave()Description copied from interface:ISqlJetMutex
Unlocks mutex.- Specified by:
leave
in interfaceISqlJetMutex
-