public final class JdbcLock extends Object implements Lock, AutoCloseable
| Constructor and Description |
|---|
JdbcLock(DataSource dataSource,
SemaphoreTablesDesc semTableDesc,
String lockName,
int jdbcTimeoutSeconds) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition() |
String |
toString() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
public JdbcLock(DataSource dataSource, SemaphoreTablesDesc semTableDesc, String lockName, int jdbcTimeoutSeconds) throws InterruptedException, SQLException
InterruptedExceptionSQLExceptionpublic void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long time,
TimeUnit unit)
throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic Condition newCondition()
newCondition in interface Lockpublic void close()
close in interface AutoCloseableCopyright © 2018 SPF4J. All rights reserved.