public class TextFileMetricsPersister extends Object implements MetricValuesPersister
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SEPARATING_STRING
Default string that separates a metric from its value.
|
Constructor and Description |
---|
TextFileMetricsPersister() |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetricFilesOlderThanMillis(long millisOld)
Delete the old metrics files that have not been modified in a certain number of milliseconds.
|
long |
getCleanupLogCount() |
long |
getDumpLogCount() |
String |
getLastDumpTimeMillisString() |
String |
getLogFileNamePrefix() |
File |
getOutputDirectory() |
boolean |
isAppendSysTimeMillis() |
boolean |
isShowDescription() |
void |
persist(Map<ControlledMetric<?,?>,Number> metricValues,
long timeMillis)
Dump a log file with all of the metrics into a log file.
|
void |
setAppendSysTimeMillis(boolean appendSysTimeMillis) |
void |
setLogFileNamePrefix(String logFileNamePrefix) |
void |
setOutputDirectory(File outputDirectory) |
void |
setSeparatingString(String separatingString) |
void |
setShowDescription(boolean showDescription) |
public static final String DEFAULT_SEPARATING_STRING
public void persist(Map<ControlledMetric<?,?>,Number> metricValues, long timeMillis) throws IOException
persist
in interface MetricValuesPersister
metricValues
- The collection of metric and metric-values we are persisting.timeMillis
- The time in millis when the metrics were collected.IOException
public void cleanMetricFilesOlderThanMillis(long millisOld)
public String getLogFileNamePrefix()
public void setLogFileNamePrefix(String logFileNamePrefix)
public boolean isAppendSysTimeMillis()
public void setAppendSysTimeMillis(boolean appendSysTimeMillis)
public File getOutputDirectory()
public void setOutputDirectory(File outputDirectory)
public void setSeparatingString(String separatingString)
public boolean isShowDescription()
public void setShowDescription(boolean showDescription)
public long getDumpLogCount()
public long getCleanupLogCount()
public String getLastDumpTimeMillisString()
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.