@Component public class CounterCommands extends AbstractMetricsCommands implements CommandMarker
Modifier | Constructor and Description |
---|---|
protected |
CounterCommands() |
Modifier and Type | Method and Description |
---|---|
boolean |
available() |
String |
display(String name,
NumberFormat pattern) |
org.springframework.shell.table.Table |
list() |
String |
reset(String name) |
displayMetrics
@CliAvailabilityIndicator(value={"counter list","counter display","counter reset"}) public boolean available()
@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) String name, @CliOption(key="pattern",help="the pattern used to format the value (see DecimalFormat)",mandatory=false,unspecifiedDefaultValue="
@CliCommand(value="counter list", help="List all available counter names") public org.springframework.shell.table.Table list()
@CliCommand(value="counter reset", help="Reset the counter with the given name") public String reset(@CliOption(mandatory=true,key={"","name"},help="the name of the counter to reset") String name)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.