Package org.apache.ignite.internal.management.cache

## 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
`static String` `CLEAR_MSG` Message that contains cleared caches.
`static String` `CONFIRM_MSG` Confirmation message format.
`static String` `SKIP_CLEAR_MSG` Message 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
`CacheClearCommand()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Class<CacheClearCommandArg>` `argClass()`
`String` `confirmationPrompt​(CacheClearCommandArg arg)`
`String` `description()` Command description.
`void` `printResult​(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

### Constructor Detail

#### CacheClearCommand

    public CacheClearCommand()

### Method Detail

#### description

    public String description()

Command description.

Specified by:
  `description` in interface `Command<CacheClearCommandArg,​ClearCachesTaskResult>`

#### confirmationPrompt

    public String confirmationPrompt​(CacheClearCommandArg arg)

Specified by:
  `confirmationPrompt` in interface `Command<CacheClearCommandArg,​ClearCachesTaskResult>`
Parameters:
  `arg` - Command argument.
Returns:
  Message text to show user for. If `null` it means that confirmation is not needed.

#### argClass

    public Class<CacheClearCommandArg> argClass()

Specified by:
  `argClass` in interface `Command<CacheClearCommandArg,​ClearCachesTaskResult>`
Returns:
  Arguments class.

#### taskClass

    public Class<ClearCachesTask> taskClass()

Specified by:
  `taskClass` in interface `ComputeCommand<CacheClearCommandArg,​ClearCachesTaskResult>`
Returns:
  Task class.

#### printResult

    public void printResult​(CacheClearCommandArg arg,
                            ClearCachesTaskResult res,
                            Consumer<String> printer)

Prints command result to the user.

Specified by:
  `printResult` in interface `ComputeCommand<CacheClearCommandArg,​ClearCachesTaskResult>`
Parameters:
  `arg` - Argument.
  `res` - Result.
  `printer` - Implementation specific printer.