Interface ListFieldChangeListener


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

    • onListFieldAdd

      <E> void onListFieldAdd(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E value)
      Receive notification of the addition (or insertion) of an element to a ListField.

      Notifications are only delivered when referrers 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
      index - the position in the list at which value was added or inserted
      value - the value added to the list
    • onListFieldRemove

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

      Notifications are only delivered when referrers 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
      index - the position in the list at which value was removed
      value - the value removed from the list
    • onListFieldReplace

      <E> void onListFieldReplace(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E oldValue, E newValue)
      Receive notification of the change in element at a specific position in a ListField.

      Notifications are only delivered when referrers 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
      index - the position in the list at which the change occurred
      oldValue - the old value at list position index
      newValue - the new value at list position index
    • onListFieldClear

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

      This method is only used when the whole list is cleared; when a sub-range of a list is cleared, individual onListFieldRemove() invocations for each removed element are made instead.

      Notifications are only delivered when referrers 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