C
- command contextpublic class LocalCommandDispatcher<C> extends Object implements CommandDispatcher<C>
CommandDispatcher
implementationConstructor and Description |
---|
LocalCommandDispatcher(Node node,
C context) |
LocalCommandDispatcher(Node node,
C context,
ExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes any resources used by this dispatcher.
|
<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.
|
public LocalCommandDispatcher(Node node, C context, ExecutorService executor)
public <R> CommandResponse<R> executeOnNode(Command<R,C> command, Node node)
CommandDispatcher
executeOnNode
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executenode
- the node to execute the command onpublic <R> Map<Node,CommandResponse<R>> executeOnCluster(Command<R,C> command, Node... excludedNodes)
CommandDispatcher
executeOnCluster
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executeexcludedNodes
- the set of nodes to excludepublic <R> Future<R> submitOnNode(Command<R,C> command, Node node)
CommandDispatcher
submitOnNode
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executenode
- the node to execute the command onpublic <R> Map<Node,Future<R>> submitOnCluster(Command<R,C> command, Node... excludedNodes)
CommandDispatcher
submitOnCluster
in interface CommandDispatcher<C>
R
- the return value typecommand
- the command to executeexcludedNodes
- the set of nodes to excludepublic void close()
CommandDispatcher
close
in interface AutoCloseable
close
in interface CommandDispatcher<C>
Copyright © 2017 JBoss by Red Hat. All rights reserved.