@Deprecated public class LocalTransport extends Object implements Transport
Transport.ThreadingModel| Constructor and Description |
|---|
LocalTransport()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClient(String ip,
int port)
Deprecated.
|
void |
addShard(String ip,
int port)
Deprecated.
|
String |
getIp()
Deprecated.
|
long |
getOwnOriginatorId()
Deprecated.
This method returns ID of this Transport instance
|
int |
getPort()
Deprecated.
|
short |
getShardIndex()
Deprecated.
|
short |
getTargetIndex()
Deprecated.
|
void |
init(VoidConfiguration voidConfiguration,
Clipboard clipboard,
NodeRole role,
String localIp,
int localPort,
short shardIndex)
Deprecated.
This method does initialization of Transport instance
|
void |
launch(Transport.ThreadingModel threading)
Deprecated.
This method starts transport mechanisms.
|
int |
numberOfKnownClients()
Deprecated.
This method returns number of known Clients
|
int |
numberOfKnownShards()
Deprecated.
This method returns number of known Shards
|
VoidMessage |
peekMessage()
Deprecated.
This method peeks 1 message from "incoming messages" queue, returning null if queue is empty
|
void |
putMessage(VoidMessage message)
Deprecated.
This method puts message into processing queue
|
void |
receiveMessage(VoidMessage message)
Deprecated.
This method accepts message from network
|
void |
sendMessage(VoidMessage message)
Deprecated.
This method accepts message for delivery, routing is applied according on message type
|
MeaningfulMessage |
sendMessageAndGetResponse(VoidMessage message)
Deprecated.
This method accepts message for delivery, and blocks until response delivered
|
void |
sendMessageToAllClients(VoidMessage message,
Long... exclusions)
Deprecated.
|
void |
sendMessageToAllShards(VoidMessage message)
Deprecated.
|
void |
setIpAndPort(String ip,
int port)
Deprecated.
|
void |
shutdown()
Deprecated.
This method stops transport system.
|
VoidMessage |
takeMessage()
Deprecated.
This method takes 1 message from "incoming messages" queue, blocking if queue is empty
|
public void init(VoidConfiguration voidConfiguration, Clipboard clipboard, NodeRole role, String localIp, int localPort, short shardIndex)
public void sendMessage(VoidMessage message)
sendMessage in interface Transportmessage - public int numberOfKnownClients()
TransportnumberOfKnownClients in interface Transportpublic int numberOfKnownShards()
TransportnumberOfKnownShards in interface Transportpublic void sendMessageToAllShards(VoidMessage message)
sendMessageToAllShards in interface Transportmessage - public void receiveMessage(VoidMessage message)
receiveMessage in interface Transportmessage - public VoidMessage takeMessage()
takeMessage in interface Transportpublic void putMessage(VoidMessage message)
putMessage in interface Transportmessage - public VoidMessage peekMessage()
PLEASE NOTE: This method is suitable for debug purposes only
peekMessage in interface Transportpublic void launch(Transport.ThreadingModel threading)
PLEASE NOTE: init() method should be called prior to launch() call
public void shutdown()
public MeaningfulMessage sendMessageAndGetResponse(@NonNull VoidMessage message)
TransportsendMessageAndGetResponse in interface Transportpublic short getShardIndex()
getShardIndex in interface Transportpublic short getTargetIndex()
getTargetIndex in interface Transportpublic void setIpAndPort(String ip, int port)
setIpAndPort in interface Transportpublic void addClient(String ip, int port)
public void addShard(String ip, int port)
public void sendMessageToAllClients(VoidMessage message, Long... exclusions)
sendMessageToAllClients in interface Transportpublic long getOwnOriginatorId()
TransportgetOwnOriginatorId in interface TransportCopyright © 2017. All rights reserved.