public class RoutedTransport extends BaseTransport
| Modifier and Type | Class and Description |
|---|---|
static class |
RoutedTransport.RemoteConnection |
Transport.ThreadingModel| Modifier and Type | Field and Description |
|---|---|
protected Map<Long,RoutedTransport.RemoteConnection> |
clients |
protected ClientRouter |
router |
protected List<RoutedTransport.RemoteConnection> |
shards |
aeron, clipboard, completed, context, driver, feedbackIdler, frameCount, idler, ip, messageHandlerForClients, messageHandlerForShards, messages, nodeRole, originatorId, port, publicationForClients, publicationForShards, runner, shardIndex, subscriptionForClients, subscriptionForShards, targetIndex, threadA, threadB, threadingModel, unicastChannelUri, voidConfiguration| Constructor and Description |
|---|
RoutedTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClient(String ip,
int port) |
void |
addShard(String ip,
int port) |
void |
init(VoidConfiguration voidConfiguration,
Clipboard clipboard,
NodeRole role,
String localIp,
int localPort,
short shardIndex)
This method does initialization of Transport instance
|
protected void |
jointMessageHandler(org.agrona.DirectBuffer buffer,
int offset,
int length,
io.aeron.logbuffer.Header header)
This message handler is responsible for receiving messages on any side of p2p network
|
void |
launch(Transport.ThreadingModel threading)
This method starts transport mechanisms.
|
int |
numberOfKnownClients()
This method returns number of known Clients
|
int |
numberOfKnownShards()
This method returns number of known Shards
|
protected void |
sendCommandToShard(VoidMessage message)
This command is possible to issue only from Client
|
protected void |
sendCoordinationCommand(VoidMessage message)
This method implements Shard -> Shards comms
|
protected void |
sendFeedbackToClient(VoidMessage message)
This method implements Shard -> Client comms
|
void |
sendMessageToAllClients(VoidMessage message,
Long... exclusions) |
void |
shutdown()
This method stops transport system.
|
protected void |
shutdownSilent() |
clientMessageHandler, getIp, getOwnOriginatorId, getPort, internalMessageHandler, peekMessage, putMessage, receiveMessage, sendMessage, sendMessageAndGetResponse, sendMessageToAllShards, setIpAndPort, shardMessageHandler, takeMessageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetShardIndex, getTargetIndexprotected List<RoutedTransport.RemoteConnection> shards
protected Map<Long,RoutedTransport.RemoteConnection> clients
protected ClientRouter router
public void init(@NonNull
VoidConfiguration voidConfiguration,
@NonNull
Clipboard clipboard,
@NonNull
NodeRole role,
@NonNull
String localIp,
int localPort,
short shardIndex)
BaseTransportinit in interface Transportinit in class BaseTransportpublic void sendMessageToAllClients(VoidMessage message, Long... exclusions)
sendMessageToAllClients in interface TransportsendMessageToAllClients in class BaseTransportprotected void sendCoordinationCommand(VoidMessage message)
sendCoordinationCommand in class BaseTransportmessage - protected void sendFeedbackToClient(VoidMessage message)
sendFeedbackToClient in class BaseTransportmessage - public int numberOfKnownClients()
TransportnumberOfKnownClients in interface TransportnumberOfKnownClients in class BaseTransportpublic int numberOfKnownShards()
TransportnumberOfKnownShards in interface TransportnumberOfKnownShards in class BaseTransportprotected void shutdownSilent()
shutdownSilent in class BaseTransportpublic void shutdown()
BaseTransportshutdown in interface Transportshutdown in class BaseTransportprotected void sendCommandToShard(VoidMessage message)
BaseTransportsendCommandToShard in class BaseTransportprotected void jointMessageHandler(org.agrona.DirectBuffer buffer,
int offset,
int length,
io.aeron.logbuffer.Header header)
buffer - offset - length - header - public void launch(@NonNull
Transport.ThreadingModel threading)
BaseTransportlaunch in interface Transportlaunch in class BaseTransportpublic void addShard(String ip, int port)
addShard in interface TransportaddShard in class BaseTransportpublic void addClient(String ip, int port)
addClient in interface TransportaddClient in class BaseTransportCopyright © 2017. All rights reserved.