Class MySqlDistributedLock
java.lang.Object
io.github.devlibx.easy.database.mysql.lock.MySqlDistributedLock
- All Implemented Interfaces:
IDistributedLock
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.devlibx.easy.lock.IDistributedLock
IDistributedLock.LockRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionachieveLock(IDistributedLock.LockRequest request) voidreleaseLock(Lock lock, IDistributedLock.LockRequest lockRequest) voidsetup(LockConfig lockConfig) voidtearDown()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.devlibx.easy.lock.IDistributedLock
releaseResources
-
Constructor Details
-
MySqlDistributedLock
@Inject public MySqlDistributedLock(@Named("lock_table_data_source") DataSource dataSource, @Named("lock_table_name") String lockTableName)
-
-
Method Details
-
setup
- Specified by:
setupin interfaceIDistributedLock
-
tearDown
public void tearDown()- Specified by:
tearDownin interfaceIDistributedLock
-
achieveLock
- Specified by:
achieveLockin interfaceIDistributedLock
-
releaseLock
- Specified by:
releaseLockin interfaceIDistributedLock
-