java.lang.Object
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.CommandDispatcher

public final class CommandDispatcher extends Object
Dispatches command to the correct handler.
  • Method Details

    • getCloseContainerHandler

      public CommandHandler getCloseContainerHandler()
    • getDeleteBlocksCommandHandler

      public CommandHandler getDeleteBlocksCommandHandler()
    • getClosePipelineCommandHandler

      public ClosePipelineCommandHandler getClosePipelineCommandHandler()
    • handle

      public void handle(SCMCommand<?> command)
      Dispatch the command to the correct handler.
      Parameters:
      command - - SCM Command.
    • stop

      public void stop()
    • getQueuedCommandCount

      public Map<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type,Integer> getQueuedCommandCount()
      For each registered handler, call its getQueuedCount method to retrieve the number of queued commands. The returned map will contain an entry for every registered command in the dispatcher, with a value of zero if there are no queued commands.
      Returns:
      A Map of CommandType where the value is the queued command count.
    • newBuilder

      public static CommandDispatcher.Builder newBuilder()