org.apache.ignite.internal.commandline.diagnostic

## Class DiagnosticCommand

- java.lang.Object
- - org.apache.ignite.internal.commandline.diagnostic.DiagnosticCommand

All Implemented Interfaces:
  Command<DiagnosticSubCommand>

    public class DiagnosticCommand
    extends Object
    implements Command<DiagnosticSubCommand>

### Constructor Summary

Constructors
Constructor and Description
`DiagnosticCommand()`

### Method Summary

All Methods Instance Methods Concrete Methods
`DiagnosticSubCommand` `arg()`
`Object` `execute(GridClientConfiguration clientCfg, Logger logger)` Actual command execution.
`String` `name()`
`void` `parseArguments(CommandArgIterator argIter)` Parse command-specific arguments.
`void` `printUsage(Logger logger)` Print info for user about command (parameters, use cases and so on).

### 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.commandline.Command

`confirmationPrompt, prepareConfirmation, startClient, usage`

### Constructor Detail

#### DiagnosticCommand

    public DiagnosticCommand()

### Method Detail

#### execute

    public Object execute(GridClientConfiguration clientCfg,
                          Logger logger)
                   throws Exception

Actual command execution. Parameters for run should be already set by calling parseArguments method.

Specified by:
  `execute` in interface `Command<DiagnosticSubCommand>`
Parameters:
  `clientCfg` - Thin client configuration if connection to cluster is necessary.
  `logger` - Logger to use.
Returns:
  Result of operation (mostly usable for tests).
Throws:
  `Exception` - If error occur.

#### arg

    public DiagnosticSubCommand arg()

Specified by:
  `arg` in interface `Command<DiagnosticSubCommand>`
Returns:
  Command arguments which were parsed during `Command.parseArguments(CommandArgIterator)` call.

#### parseArguments

    public void parseArguments(CommandArgIterator argIter)

Parse command-specific arguments.

Specified by:
  `parseArguments` in interface `Command<DiagnosticSubCommand>`
Parameters:
  `argIter` - Argument iterator.

#### name

    public String name()

Specified by:
  `name` in interface `Command<DiagnosticSubCommand>`
Returns:
  command name.

#### printUsage

    public void printUsage(Logger logger)

Print info for user about command (parameters, use cases and so on).

Specified by:
  `printUsage` in interface `Command<DiagnosticSubCommand>`
Parameters:
  `logger` - Logger to use.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020