Class SystemViewCommand
- java.lang.Object
-
- org.apache.ignite.internal.management.SystemViewCommand
-
- All Implemented Interfaces:
Command<SystemViewCommandArg,SystemViewTaskResult>,ComputeCommand<SystemViewCommandArg,SystemViewTaskResult>
public class SystemViewCommand extends Object implements ComputeCommand<SystemViewCommandArg,SystemViewTaskResult>
Command for printing system view content.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_SEPARATORColumn separator.-
Fields inherited from interface org.apache.ignite.internal.management.api.Command
CMD_NAME_POSTFIX
-
-
Constructor Summary
Constructors Constructor Description SystemViewCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<SystemViewCommandArg>argClass()Stringdescription()Command description.Collection<GridClientNode>nodes(Collection<GridClientNode> nodes, SystemViewCommandArg arg)voidprintResult(SystemViewCommandArg arg, SystemViewTaskResult res, Consumer<String> printer)Prints command result to the user.static voidprintTable(List<String> titles, List<SystemViewTask.SimpleType> types, List<List<?>> data, Consumer<String> printer)Prints specified data rows as table.Class<SystemViewTask>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
confirmationPrompt, deprecationMessage
-
Methods inherited from interface org.apache.ignite.internal.management.api.ComputeCommand
handleException
-
-
-
-
Field Detail
-
COLUMN_SEPARATOR
public static final String COLUMN_SEPARATOR
Column separator.- See Also:
- Constant Field Values
-
-
Method Detail
-
description
public String description()
Command description.- Specified by:
descriptionin interfaceCommand<SystemViewCommandArg,SystemViewTaskResult>
-
argClass
public Class<SystemViewCommandArg> argClass()
- Specified by:
argClassin interfaceCommand<SystemViewCommandArg,SystemViewTaskResult>- Returns:
- Arguments class.
-
taskClass
public Class<SystemViewTask> taskClass()
- Specified by:
taskClassin interfaceComputeCommand<SystemViewCommandArg,SystemViewTaskResult>- Returns:
- Task class.
-
nodes
public Collection<GridClientNode> nodes(Collection<GridClientNode> nodes, SystemViewCommandArg arg)
- Specified by:
nodesin interfaceComputeCommand<SystemViewCommandArg,SystemViewTaskResult>- Parameters:
nodes- Live nodes.arg- Argument.- Returns:
- nodes to execute command on,
nullmeans default node must be used.
-
printResult
public void printResult(SystemViewCommandArg arg, SystemViewTaskResult res, Consumer<String> printer)
Prints command result to the user.- Specified by:
printResultin interfaceComputeCommand<SystemViewCommandArg,SystemViewTaskResult>- Parameters:
arg- Argument.res- Result.printer- Implementation specific printer.
-
printTable
public static void printTable(List<String> titles, List<SystemViewTask.SimpleType> types, List<List<?>> data, Consumer<String> printer)
Prints specified data rows as table.- Parameters:
titles- Titles of the table columns.types- Types of the table columns.data- Table data rows.printer- Result printer.
-
-