public class GridIoManager extends GridManagerAdapter<GridCommunicationSpi<Serializable>>
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CLOSED_TOPICS
Max closed topics to store.
|
ctx, log| Constructor and Description |
|---|
GridIoManager(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageListener(GridTopic topic,
GridMessageListener lsnr) |
void |
addMessageListener(Object topic,
GridMessageListener lsnr) |
void |
addUserMessageListener(Object topic,
GridBiPredicate<UUID,?> p) |
int |
getOutboundMessagesQueueSize()
Gets outbound messages queue size.
|
long |
getReceivedBytesCount()
Gets received bytes count.
|
int |
getReceivedMessagesCount()
Gets received messages count.
|
long |
getSentBytesCount()
Gets sent bytes count.
|
int |
getSentMessagesCount()
Gets sent messages count.
|
long |
nextMessageId(Object topic,
UUID nodeId) |
void |
onKernalStart0() |
void |
onKernalStop0(boolean cancel) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
removeMessageId(Object topic) |
boolean |
removeMessageListener(GridTopic topic) |
boolean |
removeMessageListener(GridTopic topic,
GridMessageListener lsnr) |
boolean |
removeMessageListener(Object topic) |
boolean |
removeMessageListener(Object topic,
GridMessageListener lsnr) |
void |
removeUserMessageListener(Object topic,
GridBiPredicate<UUID,?> p) |
void |
resetMetrics()
Resets metrics for this manager.
|
void |
send(Collection<? extends GridNode> nodes,
GridTopic topic,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc) |
void |
send(Collection<? extends GridNode> nodes,
Object topic,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc) |
void |
send(GridNode node,
GridTopic topic,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc) |
void |
send(GridNode node,
Object topic,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc) |
void |
send(UUID nodeId,
GridTopic topic,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc) |
void |
send(UUID nodeId,
Object topic,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc) |
void |
sendOrderedMessage(Collection<? extends GridNode> nodes,
Object topic,
long msgId,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc,
long timeout,
boolean skipOnTimeout) |
void |
sendOrderedMessage(GridNode node,
Object topic,
long msgId,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc,
long timeout,
boolean skipOnTimeout) |
void |
sendOrderedMessage(UUID nodeId,
Object topic,
long msgId,
GridTcpCommunicationMessageAdapter msg,
GridIoPolicy plc,
long timeout,
boolean skipOnTimeout) |
void |
sendUserMessage(Collection<? extends GridNode> nodes,
Object msg)
Sends a peer deployable user message.
|
void |
sendUserMessage(Collection<? extends GridNode> nodes,
Object msg,
Object topic,
boolean ordered,
long timeout)
Sends a peer deployable user message.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
addSpiAttributes, assertParameter, collectDiscoveryData, enabled, getSpi, getSpi, getSpis, onDiscoveryDataReceived, onKernalStart, onKernalStop, startInfo, startSpi, stopInfo, stopSpi, toString, validateNodepublic static final int MAX_CLOSED_TOPICS
public GridIoManager(GridKernalContext ctx)
ctx - Grid kernal context.public void resetMetrics()
public void start()
throws GridException
GridException - Throws in case of any errors.public void onKernalStart0()
throws GridException
onKernalStart0 in class GridManagerAdapter<GridCommunicationSpi<Serializable>>GridException - If failed.public void onKernalStop0(boolean cancel)
onKernalStop0 in class GridManagerAdapter<GridCommunicationSpi<Serializable>>cancel - Cancel flag.public void stop(boolean cancel)
throws GridException
cancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.GridException - Thrown in case of any errors.public void send(UUID nodeId, Object topic, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc) throws GridException
nodeId - Id of destination node.topic - Topic to send the message to.msg - Message to send.plc - Type of processing.GridException - Thrown in case of any errors.public void send(UUID nodeId, GridTopic topic, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc) throws GridException
nodeId - Id of destination node.topic - Topic to send the message to.msg - Message to send.plc - Type of processing.GridException - Thrown in case of any errors.public void send(GridNode node, Object topic, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc) throws GridException
node - Destination node.topic - Topic to send the message to.msg - Message to send.plc - Type of processing.GridException - Thrown in case of any errors.public void send(GridNode node, GridTopic topic, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc) throws GridException
node - Destination node.topic - Topic to send the message to.msg - Message to send.plc - Type of processing.GridException - Thrown in case of any errors.public long nextMessageId(Object topic, UUID nodeId)
topic - Message topic.nodeId - Node ID.public void removeMessageId(Object topic)
topic - Message topic.public void sendOrderedMessage(GridNode node, Object topic, long msgId, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc, long timeout, boolean skipOnTimeout) throws GridException
node - Destination node.topic - Topic to send the message to.msgId - Ordered message ID.msg - Message to send.plc - Type of processing.timeout - Timeout to keep a message on receiving queue.skipOnTimeout - Whether message can be skipped on timeout.GridException - Thrown in case of any errors.public void sendOrderedMessage(UUID nodeId, Object topic, long msgId, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc, long timeout, boolean skipOnTimeout) throws GridException
nodeId - Destination node.topic - Topic to send the message to.msgId - Ordered message ID.msg - Message to send.plc - Type of processing.timeout - Timeout to keep a message on receiving queue.skipOnTimeout - Whether message can be skipped on timeout.GridException - Thrown in case of any errors.public void sendOrderedMessage(Collection<? extends GridNode> nodes, Object topic, long msgId, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc, long timeout, boolean skipOnTimeout) throws GridException
nodes - Destination nodes.topic - Topic to send the message to.msgId - Ordered message ID.msg - Message to send.plc - Type of processing.timeout - Timeout to keep a message on receiving queue.skipOnTimeout - Whether message can be skipped on timeout.GridException - Thrown in case of any errors.public void send(Collection<? extends GridNode> nodes, Object topic, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc) throws GridException
nodes - Destination nodes.topic - Topic to send the message to.msg - Message to send.plc - Type of processing.GridException - Thrown in case of any errors.public void send(Collection<? extends GridNode> nodes, GridTopic topic, GridTcpCommunicationMessageAdapter msg, GridIoPolicy plc) throws GridException
nodes - Destination nodes.topic - Topic to send the message to.msg - Message to send.plc - Type of processing.GridException - Thrown in case of any errors.public void sendUserMessage(Collection<? extends GridNode> nodes, Object msg) throws GridException
nodes - Destination nodes.msg - Message to send.GridException - Thrown in case of any errors.public void sendUserMessage(Collection<? extends GridNode> nodes, Object msg, @Nullable Object topic, boolean ordered, long timeout) throws GridException
nodes - Destination nodes.msg - Message to send.topic - Message topic to use.ordered - Is message ordered?timeout - Message timeout in milliseconds for ordered messages.GridException - Thrown in case of any errors.public void addUserMessageListener(@Nullable Object topic, @Nullable GridBiPredicate<UUID,?> p)
topic - Topic to subscribe to.p - Message predicate.public void removeUserMessageListener(@Nullable Object topic, GridBiPredicate<UUID,?> p)
topic - Topic to unsubscribe from.p - Message predicate.public void addMessageListener(GridTopic topic, GridMessageListener lsnr)
topic - Listener's topic.lsnr - Listener to add.public void addMessageListener(Object topic, GridMessageListener lsnr)
topic - Listener's topic.lsnr - Listener to add.public boolean removeMessageListener(GridTopic topic)
topic - Message topic.public boolean removeMessageListener(Object topic)
topic - Message topic.public boolean removeMessageListener(GridTopic topic, @Nullable GridMessageListener lsnr)
topic - Listener's topic.lsnr - Listener to remove.public boolean removeMessageListener(Object topic, @Nullable GridMessageListener lsnr)
topic - Listener's topic.lsnr - Listener to remove.public int getSentMessagesCount()
public long getSentBytesCount()
public int getReceivedMessagesCount()
public long getReceivedBytesCount()
public int getOutboundMessagesQueueSize()
public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridManagerAdapter<GridCommunicationSpi<Serializable>>Copyright © 2014. All rights reserved.