Module org.elasticsearch.server
Class MemoryTrackingTDigestArrays.MemoryTrackingTDigestDoubleArray
java.lang.Object
org.elasticsearch.search.aggregations.metrics.MemoryTrackingTDigestArrays.MemoryTrackingTDigestDoubleArray
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable,Releasable,TDigestDoubleArray
- Enclosing class:
MemoryTrackingTDigestArrays
public static class MemoryTrackingTDigestArrays.MemoryTrackingTDigestDoubleArray
extends Object
implements TDigestDoubleArray
-
Field Summary
FieldsFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionMemoryTrackingTDigestDoubleArray(CircuitBreaker breaker, double[] array) MemoryTrackingTDigestDoubleArray(CircuitBreaker breaker, int initialSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double value) final voidclose()voidensureCapacity(int requiredCapacity) static longestimatedRamBytesUsed(int size) doubleget(int index) longvoidresize(int newSize) voidset(int index, double value) intsize()voidsort()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResourcesMethods inherited from interface org.elasticsearch.core.Releasable
closeMethods inherited from interface org.elasticsearch.tdigest.arrays.TDigestDoubleArray
set
-
Field Details
-
breaker
-
-
Constructor Details
-
MemoryTrackingTDigestDoubleArray
-
MemoryTrackingTDigestDoubleArray
-
-
Method Details
-
estimatedRamBytesUsed
public static long estimatedRamBytesUsed(int size) -
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
size
public int size()- Specified by:
sizein interfaceTDigestDoubleArray
-
get
public double get(int index) - Specified by:
getin interfaceTDigestDoubleArray
-
set
public void set(int index, double value) - Specified by:
setin interfaceTDigestDoubleArray
-
add
public void add(double value) - Specified by:
addin interfaceTDigestDoubleArray
-
sort
public void sort()- Specified by:
sortin interfaceTDigestDoubleArray
-
resize
public void resize(int newSize) - Specified by:
resizein interfaceTDigestDoubleArray
-
ensureCapacity
public void ensureCapacity(int requiredCapacity) - Specified by:
ensureCapacityin interfaceTDigestDoubleArray
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-