Module org.elasticsearch.server
Class ReleasableLock
java.lang.Object
org.elasticsearch.common.util.concurrent.ReleasableLock
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
Releasable lock used inside of Engine implementations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquire()voidclose()booleanTry acquiring lock, returning null if unable.tryAcquire(TimeValue timeout) Try acquiring lock, returning null if unable to acquire lock within timeout.
-
Constructor Details
-
ReleasableLock
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
acquire
- Throws:
EngineException
-
tryAcquire
Try acquiring lock, returning null if unable. -
tryAcquire
Try acquiring lock, returning null if unable to acquire lock within timeout.- Throws:
InterruptedException
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread()
-