パッケージ org.postgresql.jdbc
クラス ResourceLock
java.lang.Object
java.util.concurrent.locks.ReentrantLock
org.postgresql.jdbc.ResourceLock
- すべての実装されたインタフェース:
Serializable
,AutoCloseable
,Lock
Extends a ReentrantLock for use in try-with-resources block.
Example use
try (ResourceLock ignore = lock.obtain()) {
// do something while holding the resource lock
}
- 関連項目:
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
クラスから継承されたメソッド java.util.concurrent.locks.ReentrantLock
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
-
コンストラクタの詳細
-
ResourceLock
public ResourceLock()
-
-
メソッドの詳細
-
obtain
Obtain a lock and return the ResourceLock for use in try-with-resources block. -
close
public void close()Unlock on exit of try-with-resources block.- 定義:
close
インタフェース内AutoCloseable
-