Class CountDownCallback


  • public class CountDownCallback
    extends Object
    Callback to be invoked once a countdown has reached the value zero. The countdown is incremented when the CountDownCallback is assigned to a CallbackNotification and decremented after the CallbackNotification has been successfully processed, or after an error has been raised.
    • Field Detail

      • countDown

        private AtomicInteger countDown
        Countdown initially 0, incremented each time the CountDownCallback is assigned to a CallbackNotification and decremented after the CallbackNotification has been successfully processed, or after an error has been raised.
      • errors

        private List<Throwable> errors
        List of errors thrown when executing notifications reactions related to this CountDownCallback.
      • callback

        private Callback callback
        Callback to invoke once the countdown reaches zero.
    • Constructor Detail

      • CountDownCallback

        public CountDownCallback​(Callback callback)
        Creates a callback by specifying the Callback to invoke. Not permitted in an Agent.
        Parameters:
        callback - the callback to invoke
        Throws:
        RuntimeException - if called by an Agent
    • Method Detail

      • incrementAndGet

        void incrementAndGet()
      • done

        void done()