Class NoopMemoryMeterListener

java.lang.Object
org.github.jamm.listeners.NoopMemoryMeterListener
All Implemented Interfaces:
MemoryMeterListener

public final class NoopMemoryMeterListener extends Object implements MemoryMeterListener
Listener that does nothing.
  • Field Details

  • Method Details

    • objectMeasured

      public void objectMeasured(Object current, long size)
      Description copied from interface: MemoryMeterListener
      Notification that the size of the specified object has been measured.
      Specified by:
      objectMeasured in interface MemoryMeterListener
      Parameters:
      current - the object that has been measured
      size - the object size in bytes
    • byteBufferRemainingMeasured

      public void byteBufferRemainingMeasured(ByteBuffer buffer, long size)
      Description copied from interface: MemoryMeterListener
      Notification that the size of the remaining bytes of a ByteBuffer have been measured.
      Specified by:
      byteBufferRemainingMeasured in interface MemoryMeterListener
      Parameters:
      buffer - the ByteBuffer
      size - the remaining bytes
    • fieldAdded

      public void fieldAdded(Object obj, String fieldName, Object fieldValue)
      Description copied from interface: MemoryMeterListener
      Notification that the field from the specified object has been added.
      Specified by:
      fieldAdded in interface MemoryMeterListener
      Parameters:
      obj - the object for which a field has been added
      fieldName - the field name
      fieldValue - the field value
    • arrayElementAdded

      public void arrayElementAdded(Object[] array, int index, Object elementValue)
      Description copied from interface: MemoryMeterListener
      Notification that the element from the specified array has been added.
      Specified by:
      arrayElementAdded in interface MemoryMeterListener
      Parameters:
      array - the array for which an element has been added
      index - the element index
      elementValue - the element value
    • done

      public void done(long size)
      Description copied from interface: MemoryMeterListener
      Notification that the entire graph has been measured.
      Specified by:
      done in interface MemoryMeterListener
      Parameters:
      size - the size of the entire graph.
    • failedToAccessField

      public void failedToAccessField(Object obj, String fieldName, Class<?> fieldType)
      Description copied from interface: MemoryMeterListener
      Notification that the graph could not be fully measured has it failed to access a field.
      Specified by:
      failedToAccessField in interface MemoryMeterListener
      Parameters:
      obj - the object owning the field that could not be accessed
      fieldName - the field name
      fieldType - the field type
    • started

      public void started(Object obj)
      Description copied from interface: MemoryMeterListener
      Notification that MemoryMeter as started analyzing the specified object.
      Specified by:
      started in interface MemoryMeterListener
      Parameters:
      obj - the object being analyzed