com.opensymphony.oscache.plugins.clustersupport
Class ClusterNotification

java.lang.Object
  extended by com.opensymphony.oscache.plugins.clustersupport.ClusterNotification
All Implemented Interfaces:
Serializable

public class ClusterNotification
extends Object
implements Serializable

A notification message that holds information about a cache event. This class is Serializable to allow it to be sent across the network to other machines running in a cluster.

Version:
$Revision: 254 $
Author:
Chris Miller, $Author: dres $
See Also:
Serialized Form

Field Summary
protected  Serializable data
          Any additional data that may be required
static int FLUSH_CACHE
          Specifies a notification message indicating that an entire cache should be flushed.
static int FLUSH_GROUP
          Specifies a notification message that indicates an entire cache group should be flushed.
static int FLUSH_KEY
          Specifies a notification message that indicates a particular cache key should be flushed.
static int FLUSH_PATTERN
          Specifies a notification message that indicates all entries in the cache that match the specified pattern should be flushed.
protected  int type
          The type of notification message.
 
Constructor Summary
ClusterNotification(int type, Serializable data)
          Creates a new notification message object to broadcast to other listening nodes in the cluster.
 
Method Summary
 Serializable getData()
          Holds any additional data that was required
 int getType()
          The type of notification message.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FLUSH_KEY

public static final int FLUSH_KEY
Specifies a notification message that indicates a particular cache key should be flushed.

See Also:
Constant Field Values

FLUSH_GROUP

public static final int FLUSH_GROUP
Specifies a notification message that indicates an entire cache group should be flushed.

See Also:
Constant Field Values

FLUSH_PATTERN

public static final int FLUSH_PATTERN
Specifies a notification message that indicates all entries in the cache that match the specified pattern should be flushed.

See Also:
Constant Field Values

FLUSH_CACHE

public static final int FLUSH_CACHE
Specifies a notification message indicating that an entire cache should be flushed.

See Also:
Constant Field Values

data

protected Serializable data
Any additional data that may be required


type

protected int type
The type of notification message.

Constructor Detail

ClusterNotification

public ClusterNotification(int type,
                           Serializable data)
Creates a new notification message object to broadcast to other listening nodes in the cluster.

Parameters:
type - The type of notification message. Valid types are FLUSH_KEY and FLUSH_GROUP.
data - Specifies the object key or group name to flush.
Method Detail

getData

public Serializable getData()
Holds any additional data that was required


getType

public int getType()
The type of notification message.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 OpenSymphony. All Rights Reserved.