Class ContinuousQueryCache.EventRouter<K,V>

java.lang.Object
com.tangosol.util.Base
com.tangosol.util.MultiplexingMapListener<K,V>
com.tangosol.net.cache.ContinuousQueryCache.EventRouter<K,V>
Type Parameters:
K - the type parameter
V - the type parameter
All Implemented Interfaces:
MapListener<K,V>, EventListener
Enclosing class:
ContinuousQueryCache<K,V_BACK,V_FRONT>

protected class ContinuousQueryCache.EventRouter<K,V> extends MultiplexingMapListener<K,V>
An EventRouter routes events from the internal cache of the ContinuousQueryCache to the client listeners, and it can do so asynchronously when appropriate.
  • Field Details

    • m_listener

      protected MapListener<? super K,? super V> m_listener
      The MapListener to route to.
    • f_fLite

      protected final boolean f_fLite
      Flag indicating MapEvent objects do not have to include the OldValue and NewValue property values in order to allow optimizations.
  • Constructor Details

    • EventRouter

      public EventRouter(MapListener<? super K,? super V> listener, boolean fLite)
      Construct an EventRouter to route events from the internal cache of the ContinuousQueryCache to the client listeners.
      Parameters:
      listener - a client listener
      fLite - true to indicate that the MapEvent objects do not have to include the OldValue and NewValue property values in order to allow optimizations
  • Method Details

    • onMapEvent

      protected void onMapEvent(MapEvent<K,V> evt)
      Description copied from class: MultiplexingMapListener
      Invoked when a map entry has been inserted, updated or deleted. To determine what action has occurred, use MapEvent.getId().
      Specified by:
      onMapEvent in class MultiplexingMapListener<K,V>
      Parameters:
      evt - the MapEvent carrying the insert, update or delete information
    • hashCode

      public int hashCode()
      Determine a hash value for the EventRouter object according to the general Object.hashCode() contract.
      Overrides:
      hashCode in class Object
      Returns:
      an integer hash value for this EventRouter
    • equals

      public boolean equals(Object o)
      Compare the EventRouter with another object to determine equality.
      Overrides:
      equals in class MultiplexingMapListener<K,V>
      Returns:
      true iff this ContinuousQueryCache.EventRouter and the passed object are equivalent listeners
    • toString

      public String toString()
      Produce a human-readable description of this EventRouter.
      Overrides:
      toString in class Object
      Returns:
      a String describing this EventRouter