Class LiveObjectEventInterceptor

  • All Implemented Interfaces:
    com.tangosol.net.events.EventDispatcherAwareInterceptor, com.tangosol.net.events.EventInterceptor, com.tangosol.net.MemberListener, EventListener

    public class LiveObjectEventInterceptor
    extends Object
    implements com.tangosol.net.events.EventDispatcherAwareInterceptor, com.tangosol.net.MemberListener
    The LiveObjectEventInterceptor is the EventInterceptor that forwards Events to objects implements LiveObject.

    IMPORTANT: The delegation of events will occur on Coherence Service threads. It is up to the LiveObject implementations to ensure that appropriate processing occurs on non-Coherence-Service threads to prevent deadlock from occurring.

    Author:
    bo, lh
    • Field Detail

      • LEASE_INSPECTION_DELAY_MS

        public static long LEASE_INSPECTION_DELAY_MS
        The delay in milliseconds between successive attempts to inspect the expiry of local Leased objects.
      • m_cacheService

        protected com.tangosol.net.CacheService m_cacheService
        The CacheService to which the EventInterceptor has been associated.
      • f_mapLeaseExpiryTimes

        protected final ConcurrentHashMap<Object,​Long> f_mapLeaseExpiryTimes
        A map of keys for Leased cache entry values and their lease expiry times.
    • Method Detail

      • onEvent

        public void onEvent​(com.tangosol.net.events.Event event)
        Specified by:
        onEvent in interface com.tangosol.net.events.EventInterceptor
      • introduceEventDispatcher

        public void introduceEventDispatcher​(String sIdentifier,
                                             com.tangosol.net.events.EventDispatcher dispatcher)
        Specified by:
        introduceEventDispatcher in interface com.tangosol.net.events.EventDispatcherAwareInterceptor
      • getCacheService

        public com.tangosol.net.CacheService getCacheService()
        Gets the cache service with which this interceptor has been registered.
        Returns:
        the CacheService
      • processEntry

        protected void processEntry​(com.tangosol.net.events.Event event,
                                    com.tangosol.util.BinaryEntry binaryEntry,
                                    Cause cause)
        Process an BinaryEntry from an interceptor event.
        Parameters:
        event - the Event
        binaryEntry - the BinaryEntry
        cause - the cause for the Event
      • isDecorationRemoved

        protected boolean isDecorationRemoved​(com.tangosol.util.BinaryEntry binEntry,
                                              int nDecorationId)
        Determines whether the given decoration has been removed from the event's new value, i.e., the decoration exists on the old value but not on the new.
        Parameters:
        binEntry - the BinaryEntry
        nDecorationId - the decoration
        Returns:
        true if the decoration has been removed for the new value
      • memberJoined

        public void memberJoined​(com.tangosol.net.MemberEvent memberEvent)
        Specified by:
        memberJoined in interface com.tangosol.net.MemberListener
      • memberLeaving

        public void memberLeaving​(com.tangosol.net.MemberEvent memberEvent)
        Specified by:
        memberLeaving in interface com.tangosol.net.MemberListener
      • memberLeft

        public void memberLeft​(com.tangosol.net.MemberEvent memberEvent)
        Specified by:
        memberLeft in interface com.tangosol.net.MemberListener