Module io.ebean.api
Package io.ebean.bean

Class NodeUsageCollector

java.lang.Object
io.ebean.bean.NodeUsageCollector

public final class NodeUsageCollector extends Object
Collects profile information for a bean (or reference/proxy bean) at a given node.

The node identifies the location of the bean in the object graph.

It has to use a weak reference so as to ensure that it does not stop the associated bean from being garbage collected.

  • Constructor Details

  • Method Details

    • setModified

      public void setModified()
      The bean has been modified by a setter method.
    • addUsed

      public void addUsed(String property)
      Add the name of a property that has been used.
    • setLoadProperty

      public void setLoadProperty(String loadProperty)
      The property that invoked a lazy load.
    • finalize

      protected void finalize() throws Throwable
      publish the collected usage information when garbage collection occurs.
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • getNode

      public ObjectGraphNode getNode()
      Return the associated node which identifies the location in the object graph of the bean/reference.
    • isEmpty

      public boolean isEmpty()
      Return true if no properties where used.
    • getUsed

      public Set<String> getUsed()
      Return the set of used properties.
    • isModified

      public boolean isModified()
      Return true if the bean was modified by a setter.
    • getLoadProperty

      public String getLoadProperty()
    • toString

      public String toString()
      Overrides:
      toString in class Object