public class GridCacheIoManager<K,V> extends GridCacheManagerAdapter<K,V>
cctx, log| Constructor and Description |
|---|
GridCacheIoManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(Class<? extends GridCacheMessage> type,
GridBiInClosure<UUID,? extends GridCacheMessage<K,V>> c)
Adds message handler.
|
void |
addOrderedHandler(Object topic,
GridBiInClosure<UUID,? extends GridCacheMessage<K,V>> c)
Adds ordered message handler.
|
long |
messageId(Object topic,
UUID nodeId) |
long |
nextIoId() |
protected void |
onKernalStop0(boolean cancel) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal data structures, etc.).
|
void |
removeHandler(Class<?> type,
GridBiInClosure<UUID,?> c)
Removes message handler.
|
void |
removeMessageId(Object topic) |
void |
removeOrderedHandler(Object topic)
Removed ordered message handler.
|
boolean |
safeSend(Collection<? extends GridNode> nodes,
GridCacheMessage<K,V> msg,
GridPredicate<GridNode> fallback)
Sends message and automatically accounts for lefts nodes.
|
void |
send(GridNode node,
GridCacheMessage<K,V> msg)
Sends communication message.
|
void |
send(GridNode node,
GridCacheMessage<K,V> msg,
GridIoPolicy plc)
Sends communication message.
|
void |
send(UUID nodeId,
GridCacheMessage<K,V> msg)
Sends communication message.
|
void |
sendOrderedMessage(GridNode node,
Object topic,
long msgId,
GridCacheMessage<K,V> msg,
long timeout) |
void |
start0() |
context, kernalStartInfo, kernalStopInfo, log, onKernalStart, onKernalStart0, onKernalStop, start, startInfo, stop, stop0, stopInfo, toStringpublic void start0()
throws GridException
start0 in class GridCacheManagerAdapter<K,V>GridException - If failed.protected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheManagerAdapter<K,V>cancel - Cancel flag.public void send(GridNode node, GridCacheMessage<K,V> msg) throws GridException
node - Node to send the message to.msg - Message to send.GridException - If sending failed.GridTopologyException - If receiver left.public void send(GridNode node, GridCacheMessage<K,V> msg, GridIoPolicy plc) throws GridException
node - Node to send the message to.msg - Message to send.GridException - If sending failed.GridTopologyException - If receiver left.public boolean safeSend(Collection<? extends GridNode> nodes, GridCacheMessage<K,V> msg, @Nullable GridPredicate<GridNode> fallback) throws GridException
nodes - Nodes to send to.msg - Message to send.fallback - Callback for failed nodes.True if nodes are empty or message was sent, false if
all nodes have left topology while sending this message.GridException - If send failed.public void send(UUID nodeId, GridCacheMessage<K,V> msg) throws GridException
nodeId - ID of node to send the message to.msg - Message to send.GridException - If sending failed.public void sendOrderedMessage(GridNode node, Object topic, long msgId, GridCacheMessage<K,V> msg, long timeout) throws GridException
node - Destination node.topic - Topic to send the message to.msgId - Ordered message ID.msg - Message to send.timeout - Timeout to keep a message on receiving queue.GridException - Thrown in case of any errors.public long messageId(Object topic, UUID nodeId)
topic - Message topic.nodeId - Node ID.public long nextIoId()
public void addHandler(Class<? extends GridCacheMessage> type, GridBiInClosure<UUID,? extends GridCacheMessage<K,V>> c)
type - Type of message.c - Handler.public void removeHandler(Class<?> type, GridBiInClosure<UUID,?> c)
type - Type of message.c - Handler.public void addOrderedHandler(Object topic, GridBiInClosure<UUID,? extends GridCacheMessage<K,V>> c)
topic - Topic.c - Handler.public void removeOrderedHandler(Object topic)
topic - Topic.public void removeMessageId(Object topic)
topic - Message topic.public void printMemoryStats()
printMemoryStats in interface GridCacheManager<K,V>printMemoryStats in class GridCacheManagerAdapter<K,V>Copyright © 2014. All rights reserved.