Class MySqlDistributedLockV2
java.lang.Object
io.github.devlibx.easy.database.mysql.lock.MySqlDistributedLockV2
- 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) voidvoidsetup(LockConfig lockConfig) voidtearDown()
-
Constructor Details
-
MySqlDistributedLockV2
@Inject public MySqlDistributedLockV2(@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
-
releaseResources
public void releaseResources()- Specified by:
releaseResourcesin interfaceIDistributedLock
-
achieveLock
- Specified by:
achieveLockin interfaceIDistributedLock
-
releaseLock
- Specified by:
releaseLockin interfaceIDistributedLock
-