public final class ScatterSender<T> extends Object implements Scatter.Sender<T>, EventHandler<GroupCommunicationMessage>
Constructor and Description |
---|
ScatterSender(String groupName,
String operName,
String selfId,
Codec<T> dataCodec,
String driverId,
int version,
CommGroupNetworkHandler commGroupNetworkHandler,
NetworkService<GroupCommunicationMessage> netService,
CommunicationGroupServiceClient commGroupClient,
ScatterEncoder scatterEncoder) |
Modifier and Type | Method and Description |
---|---|
Class<? extends Name<String>> |
getGroupName() |
Class<? extends Name<String>> |
getOperName() |
int |
getVersion() |
void |
initialize() |
void |
onNext(GroupCommunicationMessage msg)
Handles an event.
|
void |
send(List<T> elements)
Distributes evenly across task ids sorted lexicographically.
|
void |
send(List<T> elements,
Integer... counts)
Distributes as per counts across task ids sorted lexicographically.
|
void |
send(List<T> elements,
List<? extends Identifier> order)
Distributes evenly across task ids sorted using order.
|
void |
send(List<T> elements,
List<Integer> counts,
List<? extends Identifier> order)
Distributes as per counts across task ids sorted using order.
|
String |
toString() |
@Inject public ScatterSender(String groupName, String operName, String selfId, Codec<T> dataCodec, String driverId, int version, CommGroupNetworkHandler commGroupNetworkHandler, NetworkService<GroupCommunicationMessage> netService, CommunicationGroupServiceClient commGroupClient, ScatterEncoder scatterEncoder)
public int getVersion()
getVersion
in interface GroupCommOperator
public void initialize() throws ParentDeadException
initialize
in interface GroupCommOperator
ParentDeadException
public Class<? extends Name<String>> getOperName()
getOperName
in interface GroupCommOperator
public Class<? extends Name<String>> getGroupName()
getGroupName
in interface GroupCommOperator
public void onNext(GroupCommunicationMessage msg)
EventHandler
onNext
in interface EventHandler<GroupCommunicationMessage>
msg
- an eventpublic void send(List<T> elements) throws NetworkException, InterruptedException
Scatter.Sender
send
in interface Scatter.Sender<T>
NetworkException
InterruptedException
public void send(List<T> elements, Integer... counts) throws NetworkException, InterruptedException
Scatter.Sender
send
in interface Scatter.Sender<T>
NetworkException
InterruptedException
public void send(List<T> elements, List<? extends Identifier> order) throws NetworkException, InterruptedException
Scatter.Sender
send
in interface Scatter.Sender<T>
NetworkException
InterruptedException
public void send(List<T> elements, List<Integer> counts, List<? extends Identifier> order) throws NetworkException, InterruptedException
Scatter.Sender
send
in interface Scatter.Sender<T>
NetworkException
InterruptedException
Copyright © 2016 The Apache Software Foundation. All rights reserved.