Class ReleasableLock
java.lang.Object
org.elasticsearch.common.util.concurrent.ReleasableLock
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Releasable
public class ReleasableLock extends java.lang.Object implements Releasable
Releasable lock used inside of Engine implementations
-
Constructor Summary
Constructors Constructor Description ReleasableLock(java.util.concurrent.locks.Lock lock) -
Method Summary
Modifier and Type Method Description ReleasableLockacquire()voidclose()booleanisHeldByCurrentThread()
-
Constructor Details
-
ReleasableLock
public ReleasableLock(java.util.concurrent.locks.Lock lock)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceReleasable
-
acquire
- Throws:
EngineException
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread()
-