org.apache.lucene.util

## Class RamUsageTester.Accumulator

- java.lang.Object
- - org.apache.lucene.util.RamUsageTester.Accumulator

- Enclosing class:
    RamUsageTester

      public static class RamUsageTester.Accumulator
      extends Object

  An accumulator of object references. This class allows for customizing RAM usage estimation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Accumulator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `accumulateArray(Object array, long shallowSize, List<Object> values, Collection<Object> queue)` Accumulate transitive references for the provided values of the given array into `queue` 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 into `queue` and return the shallow size of this object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Accumulator

          public Accumulator()

  - ### Method Detail

    - #### 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 into `queue` 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 into `queue` and return the shallow size of this array.

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.