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)
IConnectionCallback
A batch of new messages have arrived to be processed.
recv
in interface IConnectionCallback
batch
- the messages to be processedpublic Object getValueAndReset()
Returns serialized byte count traffic metrics.
getValueAndReset
in interface IMetric
protected void updateMetrics(int sourceTaskId, TaskMessage message)
Update serialized byte counts for each message.
sourceTaskId
- source taskmessage
- serialized messageCopyright © 2022 The Apache Software Foundation. All rights reserved.