Class DemandQueueHandler<T>

    • Constructor Detail

      • DemandQueueHandler

        public DemandQueueHandler​(Queue<T> pendingDemands,
                                  BiConsumer<T,​DemandQueueHandler<T>> demandHandler,
                                  Consumer<DemandQueueHandler<T>> onCompletionHandler)
        Parameters:
        pendingDemands - the queue of pending demands to be processed
        demandHandler - the behavior to be executed for each individual demand in the queue
        onCompletionHandler - the behavior to be executed once all demands in the queue have been processed
    • Method Detail

      • execute

        public void execute()
        Specified by:
        execute in interface Procedure