Top Description Constructors Methods
org.HdrHistogram

public abstract Class EncodableHistogram

extends Object
Class Inheritance
Known Direct Subclasses
org.HdrHistogram.AbstractHistogramBase, org.HdrHistogram.DoubleHistogram
Imports
java.nio.ByteBuffer, java.util.zip.DataFormatException

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

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static EncodableHistogram
decodeFromCompressedByteBuffer(ByteBuffer
The input buffer to decode from.
buffer
,
final long
A lower bound either on the highestTrackableValue of the created Histogram, or on the HighestToLowestValueRatio of the created DoubleHistogram.
minBarForHighestTrackableValue
)

Decode a EncodableHistogram from a compressed byte buffer.

public abstract int
encodeIntoCompressedByteBuffer(final ByteBuffer targetBuffer, int compressionLevel)

public abstract long
public abstract double
public abstract int
public abstract long
public abstract String
public abstract void
setEndTimeStamp(long endTimestamp)

public abstract void
setStartTimeStamp(long startTimeStamp)

public abstract void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EncodableHistogramback to summary
public EncodableHistogram()

Method Detail

decodeFromCompressedByteBufferback to summary
pack-priv static EncodableHistogram decodeFromCompressedByteBuffer(ByteBuffer buffer, final long minBarForHighestTrackableValue) throws DataFormatException

Decode a EncodableHistogram from a compressed byte buffer. Will return either a org.HdrHistogram.Histogram or org.HdrHistogram.DoubleHistogram depending on the format found in the supplied buffer.

Parameters
buffer:ByteBuffer

The input buffer to decode from.

minBarForHighestTrackableValue:long

A lower bound either on the highestTrackableValue of the created Histogram, or on the HighestToLowestValueRatio of the created DoubleHistogram.

Returns:EncodableHistogram

The decoded org.HdrHistogram.Histogram or org.HdrHistogram.DoubleHistogram

Exceptions
DataFormatException:
on errors in decoding the buffer compression.
encodeIntoCompressedByteBufferback to summary
public abstract int encodeIntoCompressedByteBuffer(final ByteBuffer targetBuffer, int compressionLevel)
getEndTimeStampback to summary
public abstract long getEndTimeStamp()
getMaxValueAsDoubleback to summary
public abstract double getMaxValueAsDouble()
getNeededByteBufferCapacityback to summary
public abstract int getNeededByteBufferCapacity()
getStartTimeStampback to summary
public abstract long getStartTimeStamp()
getTagback to summary
public abstract String getTag()
setEndTimeStampback to summary
public abstract void setEndTimeStamp(long endTimestamp)
setStartTimeStampback to summary
public abstract void setStartTimeStamp(long startTimeStamp)
setTagback to summary
public abstract void setTag(String tag)