Class CountDownRunnable


public class CountDownRunnable extends Object
A concurrency structure that invokes a Runnable when its count reaches zero.

Method increment() and decrement() are available to increase or decrease the counter. When freeze() is invoked, no more increment() are allowed to be called. It assumes a correct invocation behavior, i.e. increment() is invoked before the corresponding decrement().

The Runnable is executed only once.

  • Constructor Details

    • CountDownRunnable

      public CountDownRunnable(Runnable runnable)
  • Method Details

    • increment

      public void increment()
    • decrement

      public void decrement()
    • missing

      public int missing()
    • freeze

      public void freeze()