Package org.HdrHistogram
Class EncodableHistogram
java.lang.Object
org.HdrHistogram.EncodableHistogram
- Direct Known Subclasses:
AbstractHistogramBase,DoubleHistogram
A base class for all encodable (and decodable) histogram classes. Log readers and writers
will generally use this base class to provide common log processing across the integer value
based AbstractHistogram subclasses and the double value based DoubleHistogram class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static EncodableHistogramdecodeFromCompressedByteBuffer(ByteBuffer buffer, long minBarForHighestTrackableValue) Decode aEncodableHistogramfrom a compressed byte buffer.abstract intencodeIntoCompressedByteBuffer(ByteBuffer targetBuffer, int compressionLevel) abstract longabstract doubleabstract intabstract longabstract StringgetTag()abstract voidsetEndTimeStamp(long endTimestamp) abstract voidsetStartTimeStamp(long startTimeStamp) abstract void
-
Constructor Details
-
EncodableHistogram
public EncodableHistogram()
-
-
Method Details
-
getNeededByteBufferCapacity
public abstract int getNeededByteBufferCapacity() -
encodeIntoCompressedByteBuffer
-
getStartTimeStamp
public abstract long getStartTimeStamp() -
setStartTimeStamp
public abstract void setStartTimeStamp(long startTimeStamp) -
getEndTimeStamp
public abstract long getEndTimeStamp() -
setEndTimeStamp
public abstract void setEndTimeStamp(long endTimestamp) -
getTag
-
setTag
-
getMaxValueAsDouble
public abstract double getMaxValueAsDouble() -
decodeFromCompressedByteBuffer
static EncodableHistogram decodeFromCompressedByteBuffer(ByteBuffer buffer, long minBarForHighestTrackableValue) throws DataFormatException Decode aEncodableHistogramfrom a compressed byte buffer. Will return either aHistogramorDoubleHistogramdepending on the format found in the supplied buffer.- Parameters:
buffer- The input buffer to decode from.minBarForHighestTrackableValue- A lower bound either on the highestTrackableValue of the created Histogram, or on the HighestToLowestValueRatio of the created DoubleHistogram.- Returns:
- The decoded
HistogramorDoubleHistogram - Throws:
DataFormatException- on errors in decoding the buffer compression.
-