public abstract class CommandSupport extends Object implements org.apache.karaf.shell.api.action.Action
Modifier and Type | Field and Description |
---|---|
protected PrintStream |
console |
protected static org.fusesource.jansi.Ansi.Color |
ERROR_COLOR |
protected static double |
MS_PER_SECOND |
Constructor and Description |
---|
CommandSupport() |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateRecordsPerSecond(long currentCount,
long start,
long end) |
protected void |
printColor(org.fusesource.jansi.Ansi.Color color,
String message) |
protected void |
printErrorMessage(String message) |
protected void |
printHeaderMessage(String message) |
protected void |
printProgressAndFlush(long start,
long totalCount,
long currentCount)
Logic mimics
org.apache.karaf.main.StartupListener#showProgressBar |
protected void |
printSuccessMessage(String message) |
protected static final double MS_PER_SECOND
protected static final org.fusesource.jansi.Ansi.Color ERROR_COLOR
protected final PrintStream console
protected void printColor(org.fusesource.jansi.Ansi.Color color, String message)
protected void printErrorMessage(String message)
protected void printHeaderMessage(String message)
protected void printSuccessMessage(String message)
protected void printProgressAndFlush(long start, long totalCount, long currentCount)
org.apache.karaf.main.StartupListener#showProgressBar
start
- time started processing recordstotalCount
- count of total recordscurrentCount
- count of records completedprotected int calculateRecordsPerSecond(long currentCount, long start, long end)
This work is licensed under a Creative Commons Attribution 4.0 International License.