Class LegacyEventMessage

  • All Implemented Interfaces:
    java.io.Serializable

    public class LegacyEventMessage
    extends EventMessage
    An Event Message, in respect of a particular cache.

    The message is Serializable, so that it can be sent across the network.

    The value of an Element is referenced with a SoftReference, so that a value will fail to be delivered in preference to an OutOfMemory error.

    Version:
    $Id: EventMessage.java 2154 2010-04-06 02:45:52Z cdennis $
    Author:
    Greg Luck
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int PUT
      A put or update event.
      static int REMOVE
      A remove or invalidate event.
      static int REMOVE_ALL
      A removeAll, which removes all elements from a cache
    • Constructor Summary

      Constructors 
      Constructor Description
      LegacyEventMessage​(int event, java.io.Serializable key, Element element)
      Full constructor.
    • Field Detail

      • REMOVE_ALL

        public static final int REMOVE_ALL
        A removeAll, which removes all elements from a cache
        See Also:
        Constant Field Values
    • Constructor Detail

      • LegacyEventMessage

        public LegacyEventMessage​(int event,
                                  java.io.Serializable key,
                                  Element element)
        Full constructor.
        Parameters:
        event -
        key -
        element -
    • Method Detail

      • getEvent

        public final int getEvent()
        Gets the event.
        Returns:
        either PUT or REMOVE
      • getElement

        public final Element getElement()
        Returns:
        the element component of the message. null if a REMOVE event
      • isValid

        public boolean isValid()
        Returns:
        true if because of SoftReference GC this LegacyEventMessage is no longer valid