-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class MetricsSystem implements AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classMetricsSystem.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final DurationinitialDelayprivate final DurationcsvReportIntervalprivate final Durationslf4jReportIntervalprivate final DurationgraphiteReportIntervalprivate final DurationcounterReportIntervalprivate final StringgraphiteServerprivate final IntegergraphiteServerPortprivate final IntegerbatchSize
-
Constructor Summary
Constructors Constructor Description MetricsSystem(ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description final StringgetName()final DurationgetInitialDelay()final DurationgetCsvReportInterval()final DurationgetSlf4jReportInterval()final DurationgetGraphiteReportInterval()final DurationgetCounterReportInterval()final StringgetGraphiteServer()final IntegergetGraphiteServerPort()final IntegergetBatchSize()final Unitinc(Integer count, Enum<?> counters)final Unitinc(Enum<?> counters)final Unitstart()Unitclose()Close the metrics system. -
-
Method Detail
-
getInitialDelay
final Duration getInitialDelay()
-
getCsvReportInterval
final Duration getCsvReportInterval()
-
getSlf4jReportInterval
final Duration getSlf4jReportInterval()
-
getGraphiteReportInterval
final Duration getGraphiteReportInterval()
-
getCounterReportInterval
final Duration getCounterReportInterval()
-
getGraphiteServer
final String getGraphiteServer()
-
getGraphiteServerPort
final Integer getGraphiteServerPort()
-
getBatchSize
final Integer getBatchSize()
-
start
final Unit start()
-
close
Unit close()
Close the metrics system.
Note: this object is closed by spring framework, but some reporter will report for the last time before close, and the last report may throw exceptions if some metrics depends on the creation of spring beans.
-
-
-
-