@Component public class CounterCommands extends AbstractMetricsCommands implements org.springframework.shell.core.CommandMarker
Modifier and Type | Field and Description |
---|---|
static String |
DELETE_COUNTER |
static String |
DISPLAY_COUNTER |
static String |
LIST_COUNTERS |
Modifier | Constructor and Description |
---|---|
protected |
CounterCommands() |
Modifier and Type | Method and Description |
---|---|
boolean |
availableWithCreateRole() |
boolean |
availableWithViewRole() |
String |
display(String name,
NumberFormat pattern) |
org.springframework.shell.table.Table |
list() |
String |
reset(String name) |
displayMetrics
public static final String DISPLAY_COUNTER
public static final String LIST_COUNTERS
public static final String DELETE_COUNTER
@CliAvailabilityIndicator(value={"counter list","counter display"}) public boolean availableWithViewRole()
@CliAvailabilityIndicator(value="counter reset") public boolean availableWithCreateRole()
@CliCommand(value="counter display", help="Display the value of a counter") public String display(@CliOption(key={"","name"},help="the name of the counter to display",mandatory=true,optionContext="existing-counter disable-string-converter") String name, @CliOption(key="pattern",help="the pattern used to format the value (see DecimalFormat)",unspecifiedDefaultValue="<use platform locale>") NumberFormat pattern)
@CliCommand(value="counter list", help="List all available counter names") public org.springframework.shell.table.Table list()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.