@groovy.transform.CompileStatic public class BatchedAcknowledgeableMessage<T> extends AcknowledgeableMessage
A batched message automatically accumulates a fixed number of messagse before sending on to a RegulatingActor.
To use a BatchedAcknowledgeableMessage, create it up front, then call the batchTo(Object, RegulatingActor) method to send messages. This will accumulate up to batchSize messages before actually placing in the queue.
When sufficient messages are accumulated, they are all sent together.
Fields inherited from class | Fields |
---|---|
class AcknowledgeableMessage |
acknowledgeCounter, payload |
Constructor and description |
---|
BatchedAcknowledgeableMessage
(java.util.concurrent.atomic.AtomicInteger counter, int batchSize) |
BatchedAcknowledgeableMessage
(BatchedAcknowledgeableMessage<T> other) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
batchTo(T o, RegulatingActor<T> to) |
|
public void |
flush(RegulatingActor<T> to) |