public class ChannelCommandDispatcherFactory extends Object implements CommandDispatcherFactory, org.jgroups.blocks.RequestHandler, AutoCloseable, Group, org.jgroups.MembershipListener
MessageDispatcher based CommandDispatcherFactory.
This factory can produce multiple CommandDispatcher instances,
all of which will share the same MessageDispatcher instance.Group.Listener| Constructor and Description |
|---|
ChannelCommandDispatcherFactory(ChannelCommandDispatcherFactoryConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Group.Listener listener)
Registers a membership listener for the group.
|
void |
block() |
void |
close() |
<C> CommandDispatcher<C> |
createCommandDispatcher(Object id,
C context)
Creates a new command dispatcher using the specified identifier and context..
|
Node |
getCoordinatorNode()
Returns the group coordinator node.
|
Group |
getGroup()
Returns the group upon which the this command dispatcher operates.
|
Node |
getLocalNode()
Returns the local node.
|
String |
getName()
Returns the name of this group.
|
List<Node> |
getNodes()
Returns the list of nodes that are members of this group.
|
Object |
handle(org.jgroups.Message message) |
boolean |
isCoordinator()
Indicates whether or not we are the group coordinator.
|
void |
removeListener(Group.Listener listener)
Removes a registered listener from the group.
|
void |
suspect(org.jgroups.Address member) |
void |
unblock() |
void |
viewAccepted(org.jgroups.View view) |
public ChannelCommandDispatcherFactory(ChannelCommandDispatcherFactoryConfiguration config)
public void close()
close in interface AutoCloseablepublic Object handle(org.jgroups.Message message) throws Exception
handle in interface org.jgroups.blocks.RequestHandlerExceptionpublic Group getGroup()
CommandDispatcherFactorygetGroup in interface CommandDispatcherFactorypublic <C> CommandDispatcher<C> createCommandDispatcher(Object id, C context)
CommandDispatcherFactoryCommandDispatcher will communicate with those dispatchers within the group sharing the same identifier.createCommandDispatcher in interface CommandDispatcherFactoryid - a unique identifier for this dispatchercontext - the context used for executing commandspublic void addListener(Group.Listener listener)
GroupaddListener in interface Grouplistener - listener to be addedpublic void removeListener(Group.Listener listener)
GroupremoveListener in interface Grouplistener - listener to be removedpublic String getName()
Grouppublic boolean isCoordinator()
GroupisCoordinator in interface Grouppublic Node getLocalNode()
GroupgetLocalNode in interface Grouppublic Node getCoordinatorNode()
GroupgetCoordinatorNode in interface Grouppublic List<Node> getNodes()
Grouppublic void viewAccepted(org.jgroups.View view)
viewAccepted in interface org.jgroups.MembershipListenerpublic void suspect(org.jgroups.Address member)
suspect in interface org.jgroups.MembershipListenerpublic void block()
block in interface org.jgroups.MembershipListenerpublic void unblock()
unblock in interface org.jgroups.MembershipListenerCopyright © 2022 JBoss by Red Hat. All rights reserved.