public interface ListFieldChangeListener
ListField
.Transaction.addListFieldChangeListener()
Modifier and Type | Method and Description |
---|---|
<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 . |
void |
onListFieldClear(Transaction tx,
ObjId id,
ListField<?> field,
int[] path,
NavigableSet<ObjId> referrers)
Receive notification of the clearing of a
ListField . |
<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 . |
<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 . |
<E> void onListFieldAdd(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E value)
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.
E
- Java type for field
's elementstx
- associated transactionid
- the ID of the affected object (i.e., the object containing the field that changed)field
- the field that changedpath
- 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 insertedvalue
- the value added to the list<E> void onListFieldRemove(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E value)
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.
E
- Java type for field
's elementstx
- associated transactionid
- the ID of the affected object (i.e., the object containing the field that changed)field
- the field that changedpath
- 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 removedvalue
- the value removed from the list<E> void onListFieldReplace(Transaction tx, ObjId id, ListField<E> field, int[] path, NavigableSet<ObjId> referrers, int index, E oldValue, E newValue)
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.
E
- Java type for field
's elementstx
- associated transactionid
- the ID of the affected object (i.e., the object containing the field that changed)field
- the field that changedpath
- 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 occurredoldValue
- the old value at list position index
newValue
- the new value at list position index
void onListFieldClear(Transaction tx, ObjId id, ListField<?> field, int[] path, NavigableSet<ObjId> referrers)
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.
tx
- associated transactionid
- the ID of the affected object (i.e., the object containing the field that was cleared)field
- the field that changedpath
- path of reference fields (represented by storage IDs) that lead to id
referrers
- all objects that (indirectly) refer to the affected object via path
Copyright © 2022. All rights reserved.