T
- The value type returned by the metric.S
- Where this is getting its Message
s from.public interface MessageMeasure<T extends Number,S extends MessageProducer<S>>
MessageMetric
to determine how much a Message
is
worth. Users are discouraged from implementing these as stateful - doing so
will result in unpredictable behavior, as a single instance of the class can
be shared across multiple MessageMetric
s.Modifier and Type | Method and Description |
---|---|
T |
initialValue()
The default value for the resulting
MessageMetric . |
T |
update(MessageMetric<T,S> metric,
Message evaluate,
MessageDeliveryStatus status,
S source)
Update metric after the arrival of another message.
|
T initialValue()
MessageMetric
.T update(MessageMetric<T,S> metric, Message evaluate, MessageDeliveryStatus status, S source)
metric
- The metric that is being updated.evaluate
- The message to evaluate.status
- Current processing status of the message.source
- The notifying object.Copyright © 2014. All rights reserved.