public class DeserializingConnectionCallback extends Object implements IConnectionCallback, IMetric
A class that is called when a TaskMessage arrives.
| Constructor and Description |
|---|
DeserializingConnectionCallback(Map<String,Object> conf,
GeneralTopologyContext context,
WorkerState.ILocalTransferCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getValueAndReset()
Returns 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.
|
public DeserializingConnectionCallback(Map<String,Object> conf, GeneralTopologyContext context, WorkerState.ILocalTransferCallback callback)
public void recv(List<TaskMessage> batch)
IConnectionCallbackA batch of new messages have arrived to be processed.
recv in interface IConnectionCallbackbatch - the messages to be processedpublic Object getValueAndReset()
Returns serialized byte count traffic metrics.
getValueAndReset in interface IMetricprotected void updateMetrics(int sourceTaskId,
TaskMessage message)
Update serialized byte counts for each message.
sourceTaskId - source taskmessage - serialized messageCopyright © 2021 The Apache Software Foundation. All rights reserved.