Class 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 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.