Add java docs for StatsCollector constructor and StatsCollectorCallback thread safety

main
Ankit Gupta 11 years ago
parent abf9920386
commit b2625a4cc1
  1. 7
      java/org/rocksdb/StatisticsCollector.java
  2. 7
      java/org/rocksdb/StatisticsCollectorCallback.java

@ -26,6 +26,13 @@ public class StatisticsCollector {
private final StatisticsCollectorCallback _statsCallback;
private volatile boolean _isRunning = true;
/**
* Constructor for statistics collector.
* @param statistics Reference of DB statistics.
* @param statsCollectionIntervalInMilliSeconds Statistics collection time
* period (specified in milliseconds)
* @param statsCallback Reference of statistics callback interface.
*/
public StatisticsCollector(Statistics statistics,
int statsCollectionIntervalInMilliSeconds,
StatisticsCollectorCallback statsCallback) {

@ -7,6 +7,13 @@ package org.rocksdb;
/**
* Callback interface provided to StatisticsCollector.
*
* Thread safety:
* StatisticsCollector doesn't make any guarantees about thread safety.
* If the same reference of StatisticsCollectorCallback is passed to multiple
* StatisticsCollector references, then its the responsibility of the
* user to make StatisticsCollectorCallback' implementation thread-safe.
*
* @param tickerType
* @param tickerCount
*/

Loading…
Cancel
Save