Interface OortObject.Listener<T>

Type Parameters:
T - the object type
All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
OortList.DeltaListener, OortMap.DeltaListener
Enclosing class:
OortObject<T>

public static interface OortObject.Listener<T>
extends java.util.EventListener
Listener for events that update the value of a OortObject.Info, either local or remote. Implementers may detect whether the value has been changed locally or remotely using OortObject.Info.isLocal().
  • Method Summary

    Modifier and Type Method Description
    default void onRemoved​(OortObject.Info<T> info)
    Callback method invoked when the object value is removed, for example because the correspondent node has been shut down or crashed.
    default void onUpdated​(OortObject.Info<T> oldInfo, OortObject.Info<T> newInfo)
    Callback method invoked when the object value is updated.
  • Method Details

    • onUpdated

      default void onUpdated​(OortObject.Info<T> oldInfo, OortObject.Info<T> newInfo)
      Callback method invoked when the object value is updated.
      Parameters:
      oldInfo - the OortObject.Info before the change, may be null
      newInfo - the OortObject.Info after the change
    • onRemoved

      default void onRemoved​(OortObject.Info<T> info)
      Callback method invoked when the object value is removed, for example because the correspondent node has been shut down or crashed.
      Parameters:
      info - the OortObject.Info before the removal