Class JChannelCommandDispatcher<CC,MC>
java.lang.Object
org.wildfly.clustering.server.jgroups.dispatcher.JChannelCommandDispatcher<CC,MC>
- Type Parameters:
CC- the command execution contextMC- the marshalling context
- All Implemented Interfaces:
AutoCloseable,org.wildfly.clustering.server.dispatcher.CommandDispatcher<ChannelGroupMember,,CC> org.wildfly.clustering.server.Registration
public class JChannelCommandDispatcher<CC,MC>
extends Object
implements org.wildfly.clustering.server.dispatcher.CommandDispatcher<ChannelGroupMember,CC>
MessageDispatcher-based command dispatcher.
- Author:
- Paul Ferraro
-
Field Summary
Fields inherited from interface org.wildfly.clustering.server.Registration
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionJChannelCommandDispatcher(CC commandContext, org.jgroups.blocks.MessageDispatcher dispatcher, CommandMarshaller<CC> marshaller, MC marshallingContext, ChannelGroup group, Duration timeout, Runnable closeTask) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<R,E extends Exception>
Map<ChannelGroupMember, CompletionStage<R>> dispatchToGroup(org.wildfly.clustering.server.dispatcher.Command<R, ? super CC, E> command, Set<ChannelGroupMember> excluding) <R,E extends Exception>
CompletionStage<R> dispatchToMember(org.wildfly.clustering.server.dispatcher.Command<R, ? super CC, E> command, ChannelGroupMember member) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.server.dispatcher.CommandDispatcher
dispatchToGroup
-
Constructor Details
-
JChannelCommandDispatcher
public JChannelCommandDispatcher(CC commandContext, org.jgroups.blocks.MessageDispatcher dispatcher, CommandMarshaller<CC> marshaller, MC marshallingContext, ChannelGroup group, Duration timeout, Runnable closeTask)
-
-
Method Details
-
getContext
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.wildfly.clustering.server.Registration
-
dispatchToMember
public <R,E extends Exception> CompletionStage<R> dispatchToMember(org.wildfly.clustering.server.dispatcher.Command<R, ? super CC, throws IOExceptionE> command, ChannelGroupMember member) - Specified by:
dispatchToMemberin interfaceorg.wildfly.clustering.server.dispatcher.CommandDispatcher<CC,MC> - Throws:
IOException
-
dispatchToGroup
public <R,E extends Exception> Map<ChannelGroupMember,CompletionStage<R>> dispatchToGroup(org.wildfly.clustering.server.dispatcher.Command<R, ? super CC, throws IOExceptionE> command, Set<ChannelGroupMember> excluding) - Specified by:
dispatchToGroupin interfaceorg.wildfly.clustering.server.dispatcher.CommandDispatcher<CC,MC> - Throws:
IOException
-