Interface CollectionListener<V>

All Superinterfaces:
EventListener
All Known Implementing Classes:
AbstractCollectionListener

public interface CollectionListener<V> extends EventListener
The listener interface for receiving CollectionEvents.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A flag that indicates this MapListener can be fired asynchronously.
    static final int
    A flag that indicates this MapListener should be fired synchronously.
    static final int
    A flag that indicates this MapListener should track versions thus allow missed versions to be replayed if supported by the source of events.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    A bit mask representing the set of characteristics of this listener.
    void
    Invoked when a collection entry has been removed.
    void
    Invoked when a collection entry has been inserted.
    void
    Invoked when a collection entry has been updated.
    default boolean
    Returns true if this listener should be fired asynchronously.
    default boolean
    Returns true if this listener should be fired synchronously.
    default boolean
    Returns true if this listener should track versions thus allowing missed versions to be replayed if supported by the event source.
  • Field Details

    • ASYNCHRONOUS

      static final int ASYNCHRONOUS
      A flag that indicates this MapListener can be fired asynchronously.
      See Also:
    • SYNCHRONOUS

      static final int SYNCHRONOUS
      A flag that indicates this MapListener should be fired synchronously.
      See Also:
    • VERSION_AWARE

      static final int VERSION_AWARE
      A flag that indicates this MapListener should track versions thus allow missed versions to be replayed if supported by the source of events.
      See Also:
  • Method Details

    • entryInserted

      void entryInserted(CollectionEvent<V> evt)
      Invoked when a collection entry has been inserted.
      Parameters:
      evt - the CollectionEvent carrying the insert information
    • entryUpdated

      void entryUpdated(CollectionEvent<V> evt)
      Invoked when a collection entry has been updated.
      Parameters:
      evt - the CollectionEvent carrying the update information
    • entryDeleted

      void entryDeleted(CollectionEvent<V> evt)
      Invoked when a collection entry has been removed.
      Parameters:
      evt - the CollectionEvent carrying the delete information
    • characteristics

      default int characteristics()
      A bit mask representing the set of characteristics of this listener.

      By default, characteristics suggest this listener is ASYNCHRONOUS.

      Returns:
      a bit mask representing the set of characteristics of this listener
      See Also:
    • isAsynchronous

      default boolean isAsynchronous()
      Returns true if this listener should be fired asynchronously.
      Returns:
      true if this listener should be fired asynchronously
    • isSynchronous

      default boolean isSynchronous()
      Returns true if this listener should be fired synchronously.
      Returns:
      true if this listener should be fired synchronously
    • isVersionAware

      default boolean isVersionAware()
      Returns true if this listener should track versions thus allowing missed versions to be replayed if supported by the event source.
      Returns:
      true if this listener should track versions