Class CommandDispatcher
java.lang.Object
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.CommandDispatcher
Dispatches command to the correct handler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class to construct command dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionMap<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.SCMCommandProto.Type, Integer> For each registered handler, call its getQueuedCount method to retrieve the number of queued commands.voidhandle(SCMCommand<?> command) Dispatch the command to the correct handler.static CommandDispatcher.Buildervoidstop()
-
Method Details
-
getCloseContainerHandler
-
getDeleteBlocksCommandHandler
-
getClosePipelineCommandHandler
-
handle
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
-