public abstract class MappingAggregationPolicy<S,T extends Message> extends Object implements AggregationPolicy<S,T,T>
Constructor and Description |
---|
MappingAggregationPolicy() |
Modifier and Type | Method and Description |
---|---|
T |
aggregate(T oldBucket,
S newMessage)
Aggregate the given message into an existing accumulator, or
create a new accumulator if no accumulator exists.
|
T |
build(T accumulator)
Build the resulting message from the accumulator.
|
int |
getCompletionIntervalMs()
Maximum number of milliseconds for which buckets should
continue accumulating messages after creation.
|
int |
getCompletionSize()
Maximum number of messages to be added to a bucket before dispatching.
|
Object |
key(S message)
Calculate a key for the given message.
|
abstract T |
map(S message) |
public Object key(S message)
AggregationPolicy
public int getCompletionSize()
AggregationPolicy
getCompletionSize
in interface AggregationPolicy<S,T extends Message,T extends Message>
public int getCompletionIntervalMs()
AggregationPolicy
getCompletionIntervalMs
in interface AggregationPolicy<S,T extends Message,T extends Message>
public T aggregate(T oldBucket, S newMessage)
AggregationPolicy
public T build(T accumulator)
AggregationPolicy
Copyright © 2018. All rights reserved.