public interface MapFieldChangeListener
Listener interface for notifications of a change in value of a
MapField
.
See Also:
Method Summary
All Methods Instance Methods Abstract Methods
<K,
V> void
Receive notification of the addition of a new key/value pair into a
MapField
.
void
Receive notification of the clearing of a
MapField
.
<K,
V> void
Receive notification of the removal of an entry from a
MapField
.
<K,
V> void
Receive notification of the change in value of an existing entry in a
MapField
.
Method Details
onMapFieldAdd
Receive notification of the addition of a new key/value pair into a
MapField
.
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:
K
- Java type for field
's keys
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 path
key
- the new map entry's key
value
- the new map entry's value
onMapFieldRemove
Receive notification of the removal of an entry from a
MapField
.
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:
K
- Java type for field
's keys
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 path
key
- the removed map entry's key
value
- the removed map entry's value
onMapFieldReplace
Receive notification of the change in value of an existing entry in a
MapField
.
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:
K
- Java type for field
's keys
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 path
key
- the map entry key
oldValue
- the previous value associated with key
newValue
- the new value associated with key
onMapFieldClear
Receive notification of the clearing of a
MapField
.
This method is only used when the whole map is cleared; when a range restricted submap is cleared, individual
onMapFieldRemove() 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