net.sf.ehcache.distribution

Class EventMessage

public final class EventMessage extends Object implements Serializable

An Event Message, in respect of a particular cache.

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

Version: $Id: EventMessage.java 52 2006-04-24 14:50:03Z gregluck $

Author: Greg Luck

UNKNOWN: SerializableHasSerializationMethods

Field Summary
static intPUT
A put or update event.
static intREMOVE
A remove or invalidate event.
Constructor Summary
EventMessage(int event, Serializable key, Element element)
Full constructor.
Method Summary
ElementgetElement()
intgetEvent()
Gets the event.
SerializablegetSerializableKey()

Field Detail

PUT

public static final int PUT
A put or update event.

REMOVE

public static final int REMOVE
A remove or invalidate event.

Constructor Detail

EventMessage

public EventMessage(int event, Serializable key, Element element)
Full constructor.

Parameters: event key element

Method Detail

getElement

public final Element getElement()

Returns: the element component of the message. null if a REMOVE event

getEvent

public final int getEvent()
Gets the event.

Returns: either PUT or REMOVE

getSerializableKey

public final Serializable getSerializableKey()

Returns: the key component of the message. null if a PUT event