Package lu.kbra.pclib.concurrency
Class ObjectTriggerLatch<T>
java.lang.Object
lu.kbra.pclib.concurrency.ObjectTriggerLatch<T>
- All Implemented Interfaces:
GenericTriggerLatch<Object>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionObjectTriggerLatch(int count, T value) ObjectTriggerLatch(int count, T value, Consumer<T> onRelease) -
Method Summary
Modifier and TypeMethodDescriptioncancel()voidintgetValue()booleanjoin()latch(GenericTriggerLatch<? super T> latch) <R extends Throwable>
ObjectTriggerLatch<T>then(ThrowingConsumer<? super T, R> onRelease) toString()voidbooleanbooleanwaitForChange(long timeout) booleanwaitForChange(long timeout, Predicate<Integer> condition) booleanwaitForChange(Predicate<Integer> condition) booleanbooleanwaitForSet(long timeout) booleanwaitForSet(long timeout, Predicate<Integer> condition) booleanwaitForSet(Predicate<Integer> condition)
-
Constructor Details
-
ObjectTriggerLatch
-
ObjectTriggerLatch
-
-
Method Details
-
cancel
-
countDown
public void countDown() -
getObject
-
getValue
public int getValue() -
join
public boolean join() -
latch
-
then
-
then
-
toString
-
trigger
- Specified by:
triggerin interfaceGenericTriggerLatch<T>
-
waitForChange
public boolean waitForChange() -
waitForChange
public boolean waitForChange(long timeout) -
waitForChange
-
waitForChange
-
waitForSet
public boolean waitForSet() -
waitForSet
public boolean waitForSet(long timeout) -
waitForSet
-
waitForSet
-