Interface SetFieldChangeListener


public interface SetFieldChangeListener
Listener interface for notifications of a change in value of a SetField.
See Also:
  • Method Details

    • onSetFieldAdd

      <E> void onSetFieldAdd(Transaction tx, ObjId id, SetField<E> field, int[] path, NavigableSet<ObjId> referrers, E value)
      Receive notification of the addition of a new element to a SetField.

      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:
      E - Java type for field's elements
      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 path
      value - the value added to the set
    • onSetFieldRemove

      <E> void onSetFieldRemove(Transaction tx, ObjId id, SetField<E> field, int[] path, NavigableSet<ObjId> referrers, E value)
      Receive notification of the removal of an element from a SetField.

      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:
      E - Java type for field's elements
      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 path
      value - the value removed from the set
    • onSetFieldClear

      void onSetFieldClear(Transaction tx, ObjId id, SetField<?> field, int[] path, NavigableSet<ObjId> referrers)
      Receive notification of the clearing of a SetField.

      This method is only used when the whole set is cleared; when a range restricted subset is cleared, individual onSetFieldRemove() invocations for each removed entry are made instead.

      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.

      Parameters:
      tx - associated transaction
      id - the ID of the affected object (i.e., the object containing the field that was cleared)
      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 path