2
* Copyright Terracotta, Inc.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
package net.sf.ehcache.distribution;
19
import java.io.Serializable;
20
import net.sf.ehcache.Ehcache;
21
import net.sf.ehcache.Element;
27
public final class RmiEventMessage extends EventMessage {
30
* Enumeration of event types.
32
public enum RmiEventType {
35
* A put or update event.
40
* A remove or invalidate event.
45
* A removeAll, which removes all elements from a cache
51
* The event component.
53
private final RmiEventType type;
56
* The element component.
58
private final Element element;
68
public RmiEventMessage(Ehcache cache, RmiEventType type, Serializable key, Element element) {
71
this.element = element;
77
* @return either {@link #PUT} or {@link #REMOVE}
79
public final RmiEventType getType() {
84
* @return the element component of the message. null if a {@link #REMOVE} event
86
public final Element getElement() {