public interface SetFieldChangeListener
SetField
.Transaction.addSetFieldChangeListener()
Modifier and Type | Method and Description |
---|---|
<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 . |
void |
onSetFieldClear(Transaction tx,
ObjId id,
SetField<?> field,
int[] path,
NavigableSet<ObjId> referrers)
Receive notification of the clearing of a
SetField . |
<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 . |
<E> void onSetFieldAdd(Transaction tx, ObjId id, SetField<E> field, int[] path, NavigableSet<ObjId> referrers, E value)
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.
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
value
- the value added to the set<E> void onSetFieldRemove(Transaction tx, ObjId id, SetField<E> field, int[] path, NavigableSet<ObjId> referrers, E value)
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.
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
value
- the value removed from the setvoid onSetFieldClear(Transaction tx, ObjId id, SetField<?> field, int[] path, NavigableSet<ObjId> referrers)
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.
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.