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
- See Also:
- Serialized Form
Nested Class Summary |
static class |
RMRequestKeysMsg.WrappedMsg
Contains the RMRequestKeysMsg and the destination to which it was
being sent. |
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. |
Method Summary |
int |
getAttempt()
|
int |
getEventId()
|
void |
handleDeliverMessage(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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
RMRequestKeysMsg
public RMRequestKeysMsg(NodeHandle source,
Address address,
Credentials authorCred,
int seqno,
java.util.Vector _rangeSet,
int _eventId)
- Constructor : Builds a new RM Message
- Parameters:
source
- the source of the messageaddress
- the RM application addressauthorCred
- the credentials of the sourceseqno
- for debugging purposes only_rangeSet
- the rangeSet of this message_eventId
- the eventId of this message
handleDeliverMessage
public void handleDeliverMessage(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()