Class ConsumersManager

  • Direct Known Subclasses:
    DBConsumersManager, FSConsumersManager

    public abstract class ConsumersManager
    extends Object
    Simple interface around a collection of consumers that allows for initializing and shutting shared resources (e.g. db connection, index, writer, etc.)
    • Method Detail

      • init

        public void init()
        This is called by BatchProcess before submitting the threads
      • shutdown

        public void shutdown()
        This is called by BatchProcess immediately before closing. Beware! Some of the consumers may have hung or may not have completed.
      • getConsumersManagerMaxMillis

        public long getConsumersManagerMaxMillis()
        BatchProcess will throw an exception if the ConsumersManager doesn't complete init() or shutdown() within this amount of time.
        the maximum time allowed for init() or shutdown()
      • setConsumersManagerMaxMillis

        public void setConsumersManagerMaxMillis​(long consumersManagerMaxMillis)
        consumersManagerMaxMillis - maximum number of milliseconds to allow for init() or shutdown()
        See Also: