public final class ScatterReceiver<T> extends Object implements Scatter.Receiver<T>, EventHandler<GroupCommunicationMessage>
Constructor and Description |
---|
ScatterReceiver(String groupName,
String operName,
String selfId,
Codec<T> dataCodec,
String driverId,
int version,
CommGroupNetworkHandler commGroupNetworkHandler,
NetworkService<GroupCommunicationMessage> netService,
CommunicationGroupServiceClient commGroupClient,
ScatterDecoder scatterDecoder) |
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.
|
List<T> |
receive()
Receive the sub-list of elements targeted for the current receiver.
|
String |
toString() |
@Inject public ScatterReceiver(String groupName, String operName, String selfId, Codec<T> dataCodec, String driverId, int version, CommGroupNetworkHandler commGroupNetworkHandler, NetworkService<GroupCommunicationMessage> netService, CommunicationGroupServiceClient commGroupClient, ScatterDecoder scatterDecoder)
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 List<T> receive() throws NetworkException, InterruptedException
Scatter.Receiver
receive
in interface Scatter.Receiver<T>
NetworkException
InterruptedException
Copyright © 2017 The Apache Software Foundation. All rights reserved.