jgroup.arm
Class ReplicaPingEvent

java.lang.Object
  extended by jgroup.arm.ReplicaPingEvent
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, ARMEvent

public class ReplicaPingEvent
extends java.lang.Object
implements ARMEvent

Since:
Jgroup 2.1
Author:
Hein Meling
See Also:
Serialized Form

Constructor Summary
ReplicaPingEvent()
          Default constructor for externalization
 
Method Summary
 int getGroupId()
          Returns the groupd identifier associated with this event.
static ReplicaPingEvent getNewPingEvent(int gid, int groupSize)
           
 java.lang.Object getObject()
          Retreive an object associated with this event.
 int getPingRate()
          Get the ping rate associated with this object.
 void handle(DistributionScheme distScheme)
          This method must implement the actual handling of the event, as recevied by the replication manager.
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReplicaPingEvent

public ReplicaPingEvent()
Default constructor for externalization

Method Detail

getNewPingEvent

public static ReplicaPingEvent getNewPingEvent(int gid,
                                               int groupSize)
Parameters:
gid - the group identifier of the group renewing its lease
groupSize - the current size of the group

getPingRate

public int getPingRate()
Get the ping rate associated with this object.

Note that this can only be called on the object created by the argument constructor, since the pingRate field is not serialized.


handle

public void handle(DistributionScheme distScheme)
Description copied from interface: ARMEvent
This method must implement the actual handling of the event, as recevied by the replication manager.

Specified by:
handle in interface ARMEvent
Parameters:
distScheme - access point to the replication manager for external events

getGroupId

public int getGroupId()
Description copied from interface: ARMEvent
Returns the groupd identifier associated with this event. If the event is not associated with any group, it should return -1.

Specified by:
getGroupId in interface ARMEvent

getObject

public java.lang.Object getObject()
Description copied from interface: ARMEvent
Retreive an object associated with this event. This method may return null if the event internals need not or should not be exposed externally.

Specified by:
getObject in interface ARMEvent

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.