Package org.loesak.esque.core.concurrent
Class ElasticsearchDocumentLock
- java.lang.Object
-
- org.loesak.esque.core.concurrent.ElasticsearchDocumentLock
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchDocumentLock(RestClientOperations operations)ElasticsearchDocumentLock(RestClientOperations operations, Duration idleBetweenTries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlock()voidlockInterruptibly()ConditionnewCondition()booleantryLock()booleantryLock(long time, TimeUnit timeUnit)voidunlock()
-
-
-
Constructor Detail
-
ElasticsearchDocumentLock
@ConstructorProperties("operations") public ElasticsearchDocumentLock(RestClientOperations operations)
-
ElasticsearchDocumentLock
@ConstructorProperties({"operations","idleBetweenTries"}) public ElasticsearchDocumentLock(RestClientOperations operations, Duration idleBetweenTries)
-
-
Method Detail
-
lockInterruptibly
public void lockInterruptibly() throws InterruptedException- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock(long time, TimeUnit timeUnit) throws InterruptedException- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
newCondition
public Condition newCondition()
- Specified by:
newConditionin interfaceLock
-
-