Package org.rocksdb
Class Statistics
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Statistics extends RocksObject
Statistics to analyze the performance of a db. Pointer for statistics object is managed by Options class.
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description Statistics()Statistics(java.util.EnumSet<HistogramType> ignoreHistograms)Statistics(java.util.EnumSet<HistogramType> ignoreHistograms, Statistics otherStatistics)Statistics(Statistics otherStatistics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddisposeInternal(long handle)longgetAndResetTickerCount(TickerType tickerType)Get the count for a ticker and reset the tickers count.HistogramDatagetHistogramData(HistogramType histogramType)Gets the histogram data for a particular histogram.java.lang.StringgetHistogramString(HistogramType histogramType)Gets a string representation of a particular histogram.longgetTickerCount(TickerType tickerType)Get the count for a ticker.voidreset()Resets all ticker and histogram stats.voidsetStatsLevel(StatsLevel statsLevel)Sets the stats level.StatsLevelstatsLevel()Gets the current stats level.java.lang.StringtoString()String representation of the statistic object.-
Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandle
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Constructor Detail
-
Statistics
public Statistics()
-
Statistics
public Statistics(Statistics otherStatistics)
-
Statistics
public Statistics(java.util.EnumSet<HistogramType> ignoreHistograms)
-
Statistics
public Statistics(java.util.EnumSet<HistogramType> ignoreHistograms, Statistics otherStatistics)
-
-
Method Detail
-
statsLevel
public StatsLevel statsLevel()
Gets the current stats level.- Returns:
- The stats level.
-
setStatsLevel
public void setStatsLevel(StatsLevel statsLevel)
Sets the stats level.- Parameters:
statsLevel- The stats level to set.
-
getTickerCount
public long getTickerCount(TickerType tickerType)
Get the count for a ticker.- Parameters:
tickerType- The ticker to get the count for- Returns:
- The count for the ticker
-
getAndResetTickerCount
public long getAndResetTickerCount(TickerType tickerType)
Get the count for a ticker and reset the tickers count.- Parameters:
tickerType- The ticker to get the count for- Returns:
- The count for the ticker
-
getHistogramData
public HistogramData getHistogramData(HistogramType histogramType)
Gets the histogram data for a particular histogram.- Parameters:
histogramType- The histogram to retrieve the data for- Returns:
- The histogram data
-
getHistogramString
public java.lang.String getHistogramString(HistogramType histogramType)
Gets a string representation of a particular histogram.- Parameters:
histogramType- The histogram to retrieve the data for- Returns:
- A string representation of the histogram data
-
reset
public void reset() throws RocksDBExceptionResets all ticker and histogram stats.- Throws:
RocksDBException- if an error occurs when resetting the statistics.
-
toString
public java.lang.String toString()
String representation of the statistic object.- Overrides:
toStringin classjava.lang.Object
-
disposeInternal
protected final void disposeInternal(long handle)
- Specified by:
disposeInternalin classRocksObject
-
-