Class BaseBatchedQueueConsumerConveyorConfiguration<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
java.lang.Object
io.datarouter.conveyor.queue.configuration.BaseBatchedQueueConsumerConveyorConfiguration<PK,D>
- All Implemented Interfaces:
ConveyorConfiguration
public abstract class BaseBatchedQueueConsumerConveyorConfiguration<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>
extends Object
implements ConveyorConfiguration
Drains the queue and stores the data in a buffer. When the buffer hits a set limit it will trigger the processing as
a batch. This implementation makes the best effort to process the buffer if the queue gets drained or it has been
interrupted.
-
Field Summary
Fields inherited from interface io.datarouter.conveyor.ConveyorConfiguration
DEFAULT_PEEK_TIMEOUT, DEFAULT_VISIBILITY_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinterrupted(ConveyorRunnable conveyor) process(ConveyorRunnable conveyor) protected abstract voidprocessBuffer(List<D> databeans) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.conveyor.ConveyorConfiguration
compactExceptionLogging, delay, shouldRunOnShutdown
-
Constructor Details
-
BaseBatchedQueueConsumerConveyorConfiguration
public BaseBatchedQueueConsumerConveyorConfiguration()
-
-
Method Details
-
processBuffer
-
getQueueConsumer
-
process
- Specified by:
processin interfaceConveyorConfiguration
-
interrupted
- Specified by:
interruptedin interfaceConveyorConfiguration- Throws:
Exception
-