Class CacheDestroyCommand
- java.lang.Object
-
- org.apache.ignite.internal.management.cache.CacheDestroyCommand
-
- All Implemented Interfaces:
Command<CacheDestroyCommandArg,Void>,ComputeCommand<CacheDestroyCommandArg,Void>,PreparableCommand<CacheDestroyCommandArg,Void>
public class CacheDestroyCommand extends Object implements ComputeCommand<CacheDestroyCommandArg,Void>, PreparableCommand<CacheDestroyCommandArg,Void>
Destroy caches.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIRM_MSGConfirmation message format.static StringNOOP_MSGNo user-created caches exists message.static StringRESULT_MSGResult message.-
Fields inherited from interface org.apache.ignite.internal.management.api.Command
CMD_NAME_POSTFIX
-
-
Constructor Summary
Constructors Constructor Description CacheDestroyCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<CacheDestroyCommandArg>argClass()StringconfirmationPrompt(CacheDestroyCommandArg arg)Stringdescription()Command description.booleanprepare(@Nullable GridClient cli, @Nullable IgniteClient client, @Nullable Ignite ignite, CacheDestroyCommandArg arg, Consumer<String> printer)Enriches argument with cluster information if required.voidprintResult(CacheDestroyCommandArg arg, Void res, Consumer<String> printer)Prints command result to the user.ClasstaskClass()-
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
-
CONFIRM_MSG
public static final String CONFIRM_MSG
Confirmation message format.- See Also:
- Constant Field Values
-
NOOP_MSG
public static final String NOOP_MSG
No user-created caches exists message.- See Also:
- Constant Field Values
-
RESULT_MSG
public static final String RESULT_MSG
Result message.- See Also:
- Constant Field Values
-
-
Method Detail
-
description
public String description()
Command description.- Specified by:
descriptionin interfaceCommand<CacheDestroyCommandArg,Void>
-
prepare
public boolean prepare(@Nullable @Nullable GridClient cli, @Nullable @Nullable IgniteClient client, @Nullable @Nullable Ignite ignite, CacheDestroyCommandArg arg, Consumer<String> printer) throws GridClientExceptionEnriches argument with cluster information if required.- Specified by:
preparein interfacePreparableCommand<CacheDestroyCommandArg,Void>- Parameters:
cli- Grid client to get required information from cluster.arg- Command argument.printer- Implementation specific printer.- Returns:
Trueif command must be executed,falseotherwise.- Throws:
GridClientException
-
confirmationPrompt
public String confirmationPrompt(CacheDestroyCommandArg arg)
- Specified by:
confirmationPromptin interfaceCommand<CacheDestroyCommandArg,Void>- Parameters:
arg- Command argument.- Returns:
- Message text to show user for. If
nullit means that confirmation is not needed.
-
printResult
public void printResult(CacheDestroyCommandArg arg, Void res, Consumer<String> printer)
Prints command result to the user.- Specified by:
printResultin interfaceComputeCommand<CacheDestroyCommandArg,Void>- Parameters:
arg- Argument.res- Result.printer- Implementation specific printer.
-
argClass
public Class<CacheDestroyCommandArg> argClass()
- Specified by:
argClassin interfaceCommand<CacheDestroyCommandArg,Void>- Returns:
- Arguments class.
-
taskClass
public Class taskClass()
- Specified by:
taskClassin interfaceComputeCommand<CacheDestroyCommandArg,Void>- Returns:
- Task class.
-
-