Package org.rocksdb

Class StatisticsCollector


  • public class StatisticsCollector
    extends java.lang.Object

    Helper 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
      void shutDown​(int shutdownTimeout)
      Shuts down statistics collector.
      void start()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.InterruptedException
        Shuts 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.