Package org.infinispan.util.concurrent
Class CountDownRunnable
- java.lang.Object
-
- org.infinispan.util.concurrent.CountDownRunnable
-
public class CountDownRunnable extends Object
A concurrency structure that invokes aRunnable
when its count reaches zero.Method
increment()
anddecrement()
are available to increase or decrease the counter. Whenfreeze()
is invoked, no moreincrement()
are allowed to be called. It assumes a correct invocation behavior, i.e.increment()
is invoked before the correspondingdecrement()
.The
Runnable
is executed only once.- Since:
- 14
-
-
Constructor Summary
Constructors Constructor Description CountDownRunnable(Runnable runnable)
-
-
-
Constructor Detail
-
CountDownRunnable
public CountDownRunnable(Runnable runnable)
-
-