Rice Pastry API

rice.rm.messaging
Class RMRequestKeysMsg

java.lang.Object
  |
  +--rice.pastry.messaging.Message
        |
        +--rice.rm.messaging.RMMessage
              |
              +--rice.rm.messaging.RMRequestKeysMsg
All Implemented Interfaces:
java.io.Serializable

public class RMRequestKeysMsg
extends RMMessage
implements java.io.Serializable

Version:
$Id: RMRequestKeysMsg.java,v 1.6 2003/05/25 21:45:24 animesh Exp $
Author:
Animesh Nandi
See Also:
Serialized Form

Nested Class Summary
static class RMRequestKeysMsg.WrappedMsg
          Contains the RMRequestKeysMsg and the destination to which it was being sent.
 
Nested classes inherited from class rice.rm.messaging.RMMessage
RMMessage.KEEntry
 
Field Summary
static int MAXATTEMPTS
          The maximum number of attempts made in the timeout mechanism after which the message is ignored.
static int TIMEOUT
          The timeout period within which if the response to this message is not received, then the same message is resent.
 
Fields inherited from class rice.rm.messaging.RMMessage
_seqno, _source
 
Constructor Summary
RMRequestKeysMsg(rice.pastry.NodeHandle source, rice.pastry.messaging.Address address, rice.pastry.security.Credentials authorCred, int seqno, java.util.Vector _rangeSet, int _eventId)
          Constructor : Builds a new RM Message
 
Method Summary
 int getAttempt()
           
 int getEventId()
           
 void handleDeliverMessage(rice.rm.RMImpl rm)
          The handling of the message iterates of the 'rangeSet' as takes the following action on the entries of type RMMessage.KEEntry.
 void incrAttempt()
          Since this message has a timeout mechanism, the next time we resend the message as a result of Timeout we need to increment the attempt number.
 void setSeqNo(int val)
          Since this message has a timeout mechanism, the next time we resend the message as a result of Timeout we need to reflect the current seqNo used by the application in the message.
 
Methods inherited from class rice.rm.messaging.RMMessage
getCredentials, getSeqno, getSource
 
Methods inherited from class rice.pastry.messaging.Message
getDate, getDestination, getSenderId, getStream, hasPriority, setPriority, setSenderId, stamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT

public static int TIMEOUT
The timeout period within which if the response to this message is not received, then the same message is resent.


MAXATTEMPTS

public static int MAXATTEMPTS
The maximum number of attempts made in the timeout mechanism after which the message is ignored.

Constructor Detail

RMRequestKeysMsg

public RMRequestKeysMsg(rice.pastry.NodeHandle source,
                        rice.pastry.messaging.Address address,
                        rice.pastry.security.Credentials authorCred,
                        int seqno,
                        java.util.Vector _rangeSet,
                        int _eventId)
Constructor : Builds a new RM Message

Parameters:
source - the source of the message
address - the RM application address
authorCred - the credentials of the source
seqno - for debugging purposes only
_rangeSet - the rangeSet of this message
_eventId - the eventId of this message
Method Detail

handleDeliverMessage

public void handleDeliverMessage(rice.rm.RMImpl rm)
The handling of the message iterates of the 'rangeSet' as takes the following action on the entries of type RMMessage.KEEntry. If first takes the intersection of the requested range with the range that it is itself responsible for. Then it issues a scan on this intersected range. If the requestor asks only for the hash of the keys in the range, then only the hash is returned, otherwise the key Set correspnding to the intersected range is returned.

Specified by:
handleDeliverMessage in class RMMessage

getEventId

public int getEventId()

setSeqNo

public void setSeqNo(int val)
Since this message has a timeout mechanism, the next time we resend the message as a result of Timeout we need to reflect the current seqNo used by the application in the message.


incrAttempt

public void incrAttempt()
Since this message has a timeout mechanism, the next time we resend the message as a result of Timeout we need to increment the attempt number.


getAttempt

public int getAttempt()

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection