ePOST API

rice.p2p.replication.messaging
Class ReplicationMessage

java.lang.Object
  extended by rice.p2p.replication.messaging.ReplicationMessage
All Implemented Interfaces:
java.io.Serializable, Message
Direct Known Subclasses:
ReminderMessage, RequestMessage, ResponseMessage

public abstract class ReplicationMessage
extends java.lang.Object
implements Message

Version:
$Id: ReplicationMessage.java 2302 2005-03-11 00:58:26Z jeffh $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  NodeHandle source
           
 
Fields inherited from interface rice.p2p.commonapi.Message
HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
protected ReplicationMessage(NodeHandle source)
          Constructor which takes a unique integer Id
 
Method Summary
 int getPriority()
          Method which should return the priority level of this message.
 NodeHandle getSource()
          Method which returns this messages' source address
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected NodeHandle source
Constructor Detail

ReplicationMessage

protected ReplicationMessage(NodeHandle source)
Constructor which takes a unique integer Id

Parameters:
source - The source address
topic - The topic
Method Detail

getPriority

public int getPriority()
Method which should return the priority level of this message. The messages can range in priority from 0 (highest priority) to Integer.MAX_VALUE (lowest) - when sending messages across the wire, the queue is sorted by message priority. If the queue reaches its limit, the lowest priority messages are discarded. Thus, applications which are very verbose should have LOW_PRIORITY or lower, and applications which are somewhat quiet are allowed to have MEDIUM_PRIORITY or possibly even HIGH_PRIORITY.

Specified by:
getPriority in interface Message
Returns:
This message's priority

getSource

public NodeHandle getSource()
Method which returns this messages' source address

Returns:
The source of this message

ePOST API

Copyright © 2001-2005 - Rice Pastry.