C
- command execution contextpublic abstract class ChannelCommandDispatcher<C> extends Object implements CommandDispatcher<C>
Constructor and Description |
---|
ChannelCommandDispatcher(org.jgroups.blocks.MessageDispatcher dispatcher,
CommandMarshaller<C> marshaller,
NodeFactory<org.jgroups.Address> factory,
long timeout,
CommandDispatcher<C> localDispatcher) |
Modifier and Type | Method and Description |
---|---|
<R> Map<Node,CommandResponse<R>> |
executeOnCluster(Command<R,C> command,
Node... excludedNodes)
Execute the specified command on all nodes in the group, excluding the specified nodes
|
<R> CommandResponse<R> |
executeOnNode(Command<R,C> command,
Node node)
Execute the specified command on the specified node.
|
<R> Map<Node,Future<R>> |
submitOnCluster(Command<R,C> command,
Node... excludedNodes)
Submits the specified command on all nodes in the group, excluding the specified nodes.
|
<R> Future<R> |
submitOnNode(Command<R,C> command,
Node node)
Submits the specified command on the specified node for execution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public ChannelCommandDispatcher(org.jgroups.blocks.MessageDispatcher dispatcher, CommandMarshaller<C> marshaller, NodeFactory<org.jgroups.Address> factory, long timeout, CommandDispatcher<C> localDispatcher)
public <R> Map<Node,CommandResponse<R>> executeOnCluster(Command<R,C> command, Node... excludedNodes) throws Exception
CommandDispatcher
executeOnCluster
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executeexcludedNodes
- the set of nodes to excludeException
- if the command could not be broadcastpublic <R> Map<Node,Future<R>> submitOnCluster(Command<R,C> command, Node... excludedNodes) throws Exception
CommandDispatcher
submitOnCluster
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executeexcludedNodes
- the set of nodes to excludeException
- if the command could not be broadcastpublic <R> CommandResponse<R> executeOnNode(Command<R,C> command, Node node) throws Exception
CommandDispatcher
executeOnNode
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executenode
- the node to execute the command onException
- if the command could not be sentpublic <R> Future<R> submitOnNode(Command<R,C> command, Node node) throws Exception
CommandDispatcher
submitOnNode
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executenode
- the node to execute the command onException
- if the command could not be sentCopyright © 2018 JBoss by Red Hat. All rights reserved.