Add java docs for StatsCollector constructor and StatsCollectorCallback thread safety

This commit is contained in:
Ankit Gupta
2014-06-29 07:52:27 -07:00
parent abf9920386
commit b2625a4cc1
2 changed files with 14 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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
*/