Interface CommandDispatcher<C>

Type Parameters:
C - the command context type
All Superinterfaces:
AutoCloseable

@Deprecated(forRemoval=true) public interface CommandDispatcher<C> extends AutoCloseable
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced by CommandDispatcher.
Dispatches commands for execution on a group.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Closes any resources used by this dispatcher.
    executeOnGroup(Command<R,? super C> command, Node... excludedMembers)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Executes the specified command on all members of the group, optionally excluding some members.
    executeOnMember(Command<R,? super C> command, Node member)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Executes the specified command on the specified group member.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the context with which this dispatcher was created.
  • Method Details

    • getContext

      C getContext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the context with which this dispatcher was created.
      Returns:
      a command execution context
    • executeOnMember

      <R> CompletionStage<R> executeOnMember(Command<R,? super C> command, Node member) throws CommandDispatcherException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Executes the specified command on the specified group member. If the member has no corresponding dispatcher, the returned completion stage throws a CancellationException.
      Type Parameters:
      R - the command execution return type
      Parameters:
      command - the command to execute
      member - the group member on which to execute the command
      Returns:
      the future result of the command execution
      Throws:
      CommandDispatcherException - if the command could not be sent
    • executeOnGroup

      <R> Map<Node,CompletionStage<R>> executeOnGroup(Command<R,? super C> command, Node... excludedMembers) throws CommandDispatcherException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Executes the specified command on all members of the group, optionally excluding some members. If a given member has no corresponding dispatcher, its completion stage throws a CancellationException.
      Type Parameters:
      R - the command execution return type
      Parameters:
      command - the command to execute
      excludedMembers - the members to be excluded from group command execution
      Returns:
      a completion stage per member of the group on which the command was executed
      Throws:
      CommandDispatcherException - if the command could not be sent
    • close

      void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Closes any resources used by this dispatcher. Once closed, a dispatcher can no longer execute commands.
      Specified by:
      close in interface AutoCloseable