Class AutomaticLatch
java.lang.Object
org.apache.activemq.artemis.utils.AbstractLatch
org.apache.activemq.artemis.utils.AutomaticLatch
An automatic latch has the same semantic as the ReusableLatch However this class has a replaceable callback that
could be called when the number of elements reach zero. With that you can either block to wait completion, or to send
a callback to be used when it reaches 0.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.activemq.artemis.utils.AbstractLatch
AbstractLatch.CountSync -
Field Summary
Fields inherited from class org.apache.activemq.artemis.utils.AbstractLatch
control -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCompletion(Runnable newRun) final voidfinal voidcountDown(int count)
-
Constructor Details
-
AutomaticLatch
public AutomaticLatch() -
AutomaticLatch
public AutomaticLatch(int count)
-
-
Method Details
-
afterCompletion
-
countDown
public final void countDown()- Specified by:
countDownin classAbstractLatch
-
countDown
public final void countDown(int count) - Specified by:
countDownin classAbstractLatch
-