Class CompressedExponentialHistogramHolder
java.lang.Object
org.elasticsearch.exponentialhistogram.CompressedExponentialHistogramHolder
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
Holds an
ExponentialHistogram in its encoded form using a circuit-breaking byte buffer
for proper memory accounting.
When set to a CompressedExponentialHistogram, the already-encoded bytes are copied directly
without re-encoding. For other ExponentialHistogram implementations, the histogram is encoded
into the compressed format first.
The stored histogram can be accessed as a ExponentialHistogram via accessor().
-
Method Summary
Modifier and TypeMethodDescriptionaccessor()Provides read access to the histogram this holder stores.voidclose()create(ExponentialHistogramCircuitBreaker breaker) longvoidset(ExponentialHistogram incoming) Sets this holder to a copy of the given histogram.
-
Method Details
-
create
public static CompressedExponentialHistogramHolder create(ExponentialHistogramCircuitBreaker breaker) -
set
Sets this holder to a copy of the given histogram. -
accessor
Provides read access to the histogram this holder stores. -
ramBytesUsed
public long ramBytesUsed()- Returns:
- the estimated RAM usage of this holder including the encoded buffer.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-