Interface MapListener<K,​V>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ASYNCHRONOUS
      A flag that indicates this MapListener can be fired asynchronously.
      static int SYNCHRONOUS
      A flag that indicates this MapListener should be fired synchronously.
      static 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.
    • Field Detail

      • ASYNCHRONOUS

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

        static final int SYNCHRONOUS
        A flag that indicates this MapListener should be fired synchronously.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
    • Method Detail

      • entryInserted

        void entryInserted​(MapEvent<K,​V> evt)
        Invoked when a map entry has been inserted.
        Parameters:
        evt - the MapEvent carrying the insert information
      • entryUpdated

        void entryUpdated​(MapEvent<K,​V> evt)
        Invoked when a map entry has been updated.
        Parameters:
        evt - the MapEvent carrying the update information
      • entryDeleted

        void entryDeleted​(MapEvent<K,​V> evt)
        Invoked when a map entry has been removed.
        Parameters:
        evt - the MapEvent carrying the delete information
      • synchronous

        default MapListener<K,​V> synchronous()
        Make this MapListener synchronous.

        This should be considered as a very advanced feature, as a synchronous MapListener must exercise extreme caution during event processing since any delay with return or unhandled exception will cause a delay or complete shutdown of the corresponding service.

        Returns:
        a synchronous MapListener
        See Also:
        SynchronousListener, MapListenerSupport.SynchronousListener
      • 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:
        ASYNCHRONOUS, SYNCHRONOUS, VERSION_AWARE
      • 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