@Component public class CounterCommands extends AbstractMetricsCommands implements org.springframework.shell.core.CommandMarker
Modifier | Constructor and Description |
---|---|
protected |
CounterCommands() |
Modifier and Type | Method and Description |
---|---|
boolean |
available() |
java.lang.String |
delete(java.lang.String name) |
java.lang.String |
display(java.lang.String name,
java.text.NumberFormat pattern) |
Table |
list() |
displayMetrics
@CliAvailabilityIndicator(value={"counter list","counter display","counter delete"}) public boolean available()
@CliCommand(value="counter display", help="Display the value of a counter") public java.lang.String display(@CliOption(key={"","name"},help="the name of the counter to display",mandatory=true,optionContext="existing-counter disable-string-converter") java.lang.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 Table list()
@CliCommand(value="counter delete", help="Delete the counter with the given name") public java.lang.String delete(@CliOption(mandatory=true,key={"","name"},help="the name of the counter to delete",optionContext="existing-counter disable-string-converter") java.lang.String name)