Class CacheClearCommand
- java.lang.Object
-
- org.apache.ignite.internal.management.cache.CacheClearCommand
-
- All Implemented Interfaces:
Command<CacheClearCommandArg,ClearCachesTaskResult>,ComputeCommand<CacheClearCommandArg,ClearCachesTaskResult>
public class CacheClearCommand extends Object implements ComputeCommand<CacheClearCommandArg,ClearCachesTaskResult>
Clear caches.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLEAR_MSGMessage that contains cleared caches.static StringCONFIRM_MSGConfirmation message format.static StringSKIP_CLEAR_MSGMessage that contains not-cleared caches (they don't exist).-
Fields inherited from interface org.apache.ignite.internal.management.api.Command
CMD_NAME_POSTFIX
-
-
Constructor Summary
Constructors Constructor Description CacheClearCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<CacheClearCommandArg>argClass()StringconfirmationPrompt(CacheClearCommandArg arg)Stringdescription()Command description.voidprintResult(CacheClearCommandArg arg, ClearCachesTaskResult res, Consumer<String> printer)Prints command result to the user.Class<ClearCachesTask>taskClass()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.management.api.Command
deprecationMessage
-
Methods inherited from interface org.apache.ignite.internal.management.api.ComputeCommand
handleException, nodes
-
-
-
-
Field Detail
-
CLEAR_MSG
public static final String CLEAR_MSG
Message that contains cleared caches.- See Also:
- Constant Field Values
-
SKIP_CLEAR_MSG
public static final String SKIP_CLEAR_MSG
Message that contains not-cleared caches (they don't exist).- See Also:
- Constant Field Values
-
CONFIRM_MSG
public static final String CONFIRM_MSG
Confirmation message format.- See Also:
- Constant Field Values
-
-
Method Detail
-
description
public String description()
Command description.- Specified by:
descriptionin interfaceCommand<CacheClearCommandArg,ClearCachesTaskResult>
-
confirmationPrompt
public String confirmationPrompt(CacheClearCommandArg arg)
- Specified by:
confirmationPromptin interfaceCommand<CacheClearCommandArg,ClearCachesTaskResult>- Parameters:
arg- Command argument.- Returns:
- Message text to show user for. If
nullit means that confirmation is not needed.
-
argClass
public Class<CacheClearCommandArg> argClass()
- Specified by:
argClassin interfaceCommand<CacheClearCommandArg,ClearCachesTaskResult>- Returns:
- Arguments class.
-
taskClass
public Class<ClearCachesTask> taskClass()
- Specified by:
taskClassin interfaceComputeCommand<CacheClearCommandArg,ClearCachesTaskResult>- Returns:
- Task class.
-
printResult
public void printResult(CacheClearCommandArg arg, ClearCachesTaskResult res, Consumer<String> printer)
Prints command result to the user.- Specified by:
printResultin interfaceComputeCommand<CacheClearCommandArg,ClearCachesTaskResult>- Parameters:
arg- Argument.res- Result.printer- Implementation specific printer.
-
-