com.alachisoft.jvcache.event
Class ClusterEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.alachisoft.jvcache.event.ClusterEvent
All Implemented Interfaces:
java.io.Serializable

public class ClusterEvent
extends java.util.EventObject

ClusterEvent is used to notify interested parties that something has happened with respect to the cluster.

See Also:
Serialized Form

Nested Class Summary
static class ClusterEvent.EventType
          Defines the JOINED and LEFT event types, along with their string representations, returned by toString().
 
Constructor Summary
ClusterEvent(java.lang.Object source, ClusterEvent.EventType type, java.lang.String cacheId)
          Creates a new object representing a cluster event.
ClusterEvent(java.lang.Object source, ClusterEvent.EventType type, java.lang.String ip, int port, java.lang.String cacheId)
          Creates a new object representing a cluster event.
 
Method Summary
 java.lang.String getCacheId()
          Returns cache-id of the stopped cache.
 ClusterEvent.EventType getEventType()
          Gets the type of event.
 java.lang.String getIp()
          Returns IP of the member node.
 long getPort()
          Returns the NCache Socket Server port.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClusterEvent

public ClusterEvent(java.lang.Object source,
                    ClusterEvent.EventType type,
                    java.lang.String ip,
                    int port,
                    java.lang.String cacheId)
Creates a new object representing a cluster event.

Parameters:
source - the object responsible for the event
type - the event type
ip - the ip of the memeber.
port - the port of the memeber.

ClusterEvent

public ClusterEvent(java.lang.Object source,
                    ClusterEvent.EventType type,
                    java.lang.String cacheId)
Creates a new object representing a cluster event.

Parameters:
type - The type of cluster event.
source - the object responsible for the event
cacheId - the cache-id of the stopped cache.
Method Detail

getEventType

public ClusterEvent.EventType getEventType()
Gets the type of event.

Returns:
the type

getPort

public long getPort()
Returns the NCache Socket Server port.

Returns:
Returns the NCache Socket Server port.

getIp

public java.lang.String getIp()
Returns IP of the member node.

Returns:
Returns IP of the member node.

getCacheId

public java.lang.String getCacheId()
Returns cache-id of the stopped cache.

Returns:
Returns cache-id of the stopped cache.