Class ReferenceCounterUtil

    • Constructor Detail

      • ReferenceCounterUtil

        public ReferenceCounterUtil()
      • ReferenceCounterUtil

        public ReferenceCounterUtil​(Executor executor)
      • ReferenceCounterUtil

        public ReferenceCounterUtil​(Runnable runnable,
                                    Executor executor)
      • ReferenceCounterUtil

        public ReferenceCounterUtil​(Runnable runnable)
    • Method Detail

      • exhaust

        public void exhaust()
        it will set the value all the way to 0, and execute the task meant for when the value was 0.
      • check

        public void check()
        Description copied from interface: ReferenceCounter
        Some asynchronous operations (like ack) may delay certain conditions. After met, during afterCompletion we may need to recheck certain values to make sure we won't get into a situation where the condition was met asynchronously and queues not removed.
        Specified by:
        check in interface ReferenceCounter