Package org.rocksdb
Class StatisticsCollector
- java.lang.Object
-
- org.rocksdb.StatisticsCollector
-
public class StatisticsCollector extends java.lang.ObjectHelper class to collect DB statistics periodically at a period specified in constructor. Callback function (provided in constructor) is called with every statistics collection.
Caller should call start() to start statistics collection. Shutdown() should be called to stop stats collection and should be called before statistics ( provided in constructor) reference has been disposed.
-
-
Constructor Summary
Constructors Constructor Description StatisticsCollector(java.util.List<StatsCollectorInput> statsCollectorInputList, int statsCollectionIntervalInMilliSeconds)Constructor for statistics collector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidshutDown(int shutdownTimeout)Shuts down statistics collector.voidstart()
-
-
-
Constructor Detail
-
StatisticsCollector
public StatisticsCollector(java.util.List<StatsCollectorInput> statsCollectorInputList, int statsCollectionIntervalInMilliSeconds)
Constructor for statistics collector.- Parameters:
statsCollectorInputList- List of statistics collector input.statsCollectionIntervalInMilliSeconds- Statistics collection time period (specified in milliseconds).
-
-
Method Detail
-
start
public void start()
-
shutDown
public void shutDown(int shutdownTimeout) throws java.lang.InterruptedExceptionShuts down statistics collector.- Parameters:
shutdownTimeout- Time in milli-seconds to wait for shutdown before killing the collection process.- Throws:
java.lang.InterruptedException- thrown if Threads are interrupted.
-
-