1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 // This source code is licensed under both the GPLv2 (found in the 3 // COPYING file in the root directory) and Apache 2.0 License 4 // (found in the LICENSE.Apache file in the root directory). 5 6 package org.rocksdb; 7 8 /** 9 * Callback interface provided to StatisticsCollector. 10 * 11 * Thread safety: 12 * StatisticsCollector doesn't make any guarantees about thread safety. 13 * If the same reference of StatisticsCollectorCallback is passed to multiple 14 * StatisticsCollector references, then its the responsibility of the 15 * user to make StatisticsCollectorCallback's implementation thread-safe. 16 * 17 */ 18 public interface StatisticsCollectorCallback { 19 /** 20 * Callback function to get ticker values. 21 * @param tickerType Ticker type. 22 * @param tickerCount Value of ticker type. 23 */ tickerCallback(TickerType tickerType, long tickerCount)24 void tickerCallback(TickerType tickerType, long tickerCount); 25 26 /** 27 * Callback function to get histogram values. 28 * @param histType Histogram type. 29 * @param histData Histogram data. 30 */ histogramCallback(HistogramType histType, HistogramData histData)31 void histogramCallback(HistogramType histType, HistogramData histData); 32 } 33