Package org.apache.lucene.tests.util
Class RamUsageTester.Accumulator
java.lang.Object
org.apache.lucene.tests.util.RamUsageTester.Accumulator
- Enclosing class:
RamUsageTester
An accumulator of object references. This class allows for customizing RAM usage estimation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
accumulateArray
(Object array, long shallowSize, List<Object> values, Collection<Object> queue) Accumulate transitive references for the provided values of the given array intoqueue
and return the shallow size of this array.long
accumulateObject
(Object o, long shallowSize, Map<Field, Object> fieldValues, Collection<Object> queue) Accumulate transitive references for the provided fields of the given object intoqueue
and return the shallow size of this object.
-
Constructor Details
-
Accumulator
public Accumulator()
-
-
Method Details
-
accumulateObject
public long accumulateObject(Object o, long shallowSize, Map<Field, Object> fieldValues, Collection<Object> queue) Accumulate transitive references for the provided fields of the given object intoqueue
and return the shallow size of this object. -
accumulateArray
public long accumulateArray(Object array, long shallowSize, List<Object> values, Collection<Object> queue) Accumulate transitive references for the provided values of the given array intoqueue
and return the shallow size of this array.
-