E
- the element typepublic static class OortList.DeltaListener<E> extends Object implements OortObject.Listener<List<E>>
An implementation of Listener
that converts whole list events into OortList.ElementListener
events.
For example, if an entity list:
[A, B]
is replaced by a list:
[A, C, D]
then this listener generates two "add" events for C
and D
and one "remove" event for B
.
Constructor and Description |
---|
DeltaListener(OortList<E> oortList) |
Modifier and Type | Method and Description |
---|---|
void |
onRemoved(OortObject.Info<List<E>> info)
Callback method invoked when the object value is removed, for example
because the correspondent node has been shut down or crashed.
|
void |
onUpdated(OortObject.Info<List<E>> oldInfo,
OortObject.Info<List<E>> newInfo)
Callback method invoked when the object value is updated.
|
public void onUpdated(OortObject.Info<List<E>> oldInfo, OortObject.Info<List<E>> newInfo)
OortObject.Listener
onUpdated
in interface OortObject.Listener<List<E>>
oldInfo
- the OortObject.Info
before the change, may be nullnewInfo
- the OortObject.Info
after the changepublic void onRemoved(OortObject.Info<List<E>> info)
OortObject.Listener
onRemoved
in interface OortObject.Listener<List<E>>
info
- the OortObject.Info
before the removalCopyright © 2008–2024 The CometD Project. All rights reserved.