public class GatherReceiver<T> extends Object implements Gather.Receiver<T>, EventHandler<GroupCommunicationMessage>
| Constructor and Description |
|---|
GatherReceiver(String groupName,
String operName,
String selfId,
Codec<T> dataCodec,
String driverId,
int version,
CommGroupNetworkHandler commGroupNetworkHandler,
NetworkService<GroupCommunicationMessage> netService,
CommunicationGroupServiceClient commGroupClient) |
| 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 elements sent by the senders in default order.
|
List<T> |
receive(List<? extends Identifier> order)
Receive the elements sent by the senders in specified order.
|
String |
toString() |
@Inject public GatherReceiver(String groupName, String operName, String selfId, Codec<T> dataCodec, String driverId, int version, CommGroupNetworkHandler commGroupNetworkHandler, NetworkService<GroupCommunicationMessage> netService, CommunicationGroupServiceClient commGroupClient)
public int getVersion()
getVersion in interface GroupCommOperatorpublic void initialize() throws ParentDeadException
initialize in interface GroupCommOperatorParentDeadExceptionpublic Class<? extends Name<String>> getOperName()
getOperName in interface GroupCommOperatorpublic Class<? extends Name<String>> getGroupName()
getGroupName in interface GroupCommOperatorpublic void onNext(GroupCommunicationMessage msg)
EventHandleronNext in interface EventHandler<GroupCommunicationMessage>msg - an eventpublic List<T> receive() throws NetworkException, InterruptedException
Gather.Receiverreceive in interface Gather.Receiver<T>NetworkExceptionInterruptedExceptionpublic List<T> receive(List<? extends Identifier> order) throws NetworkException, InterruptedException
Gather.Receiverreceive in interface Gather.Receiver<T>NetworkExceptionInterruptedExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.