public interface IConnection
Modifier and Type | Method and Description |
---|---|
void |
close()
close this connection
|
Map<Integer,Load> |
getLoad(Collection<Integer> tasks)
Get the current load for the given tasks
|
void |
registerRecv(IConnectionCallback cb)
Register a callback to be notified when data is ready to be processed.
|
void |
send(int taskId,
byte[] payload)
send a message with taskId and payload
|
void |
send(Iterator<TaskMessage> msgs)
send batch messages
|
void |
sendLoadMetrics(Map<Integer,Double> taskToLoad)
Send load metrics to all downstream connections.
|
void registerRecv(IConnectionCallback cb)
Register a callback to be notified when data is ready to be processed.
cb
- the callback to process the messages.void sendLoadMetrics(Map<Integer,Double> taskToLoad)
Send load metrics to all downstream connections.
taskToLoad
- a map from the task id to the load for that task.void send(int taskId, byte[] payload)
send a message with taskId and payload
taskId
- task IDpayload
- void send(Iterator<TaskMessage> msgs)
send batch messages
msgs
- Map<Integer,Load> getLoad(Collection<Integer> tasks)
Get the current load for the given tasks
tasks
- the tasks to look for.void close()
close this connection
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.