Package org.apache.storm.messaging
Class DeserializingConnectionCallback
java.lang.Object
org.apache.storm.messaging.DeserializingConnectionCallback
- All Implemented Interfaces:
IConnectionCallback
,IMetric
A class that is called when a TaskMessage arrives.
-
Constructor Summary
ConstructorDescriptionDeserializingConnectionCallback
(Map<String, Object> conf, GeneralTopologyContext context, WorkerState.ILocalTransferCallback callback) -
Method Summary
Modifier and TypeMethodDescriptionReturns serialized byte count traffic metrics.void
recv
(List<TaskMessage> batch) A batch of new messages have arrived to be processed.protected void
updateMetrics
(int sourceTaskId, TaskMessage message) Update serialized byte counts for each message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.storm.metric.api.IMetric
getDimensions
-
Constructor Details
-
DeserializingConnectionCallback
public DeserializingConnectionCallback(Map<String, Object> conf, GeneralTopologyContext context, WorkerState.ILocalTransferCallback callback)
-
-
Method Details
-
recv
Description copied from interface:IConnectionCallback
A batch of new messages have arrived to be processed.- Specified by:
recv
in interfaceIConnectionCallback
- Parameters:
batch
- the messages to be processed
-
getValueAndReset
Returns serialized byte count traffic metrics.- Specified by:
getValueAndReset
in interfaceIMetric
- Returns:
- Map of metric counts, or null if disabled
-
updateMetrics
Update serialized byte counts for each message.- Parameters:
sourceTaskId
- source taskmessage
- serialized message
-