Interface SimpleFieldChangeListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SimpleFieldChangeListener
Listener interface for notifications of a change in value of a SimpleField.
See Also:
  • Method Details

    • onSimpleFieldChange

      <V> void onSimpleFieldChange(Transaction tx, ObjId id, SimpleField<V> field, int[] path, NavigableSet<ObjId> referrers, V oldValue, V newValue)
      Receive notification of a change in the value of a SimpleField in an object.

      Notifications are only delivered when the set of referring objects is non-empty.

      Notifications are delivered in the same thread that made the change, before the outermost mutation operation returns.

      Type Parameters:
      V - Java type for field's values
      Parameters:
      tx - associated transaction
      id - the ID of the affected object (i.e., the object containing the field that changed)
      field - the field that changed
      path - path of reference fields (represented by storage IDs) that lead to id
      referrers - all objects that (indirectly) refer to the affected object via the path
      oldValue - the field's previous value
      newValue - the field's new value