You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:24:28 UTC
svn commit: r1131742 -
/incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp
Author: benh
Date: Sun Jun 5 05:24:28 2011
New Revision: 1131742
URL: http://svn.apache.org/viewvc?rev=1131742&view=rev
Log:
Updated reliable API.
Modified:
incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp
Modified: incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp?rev=1131742&r1=1131741&r2=1131742&view=diff
==============================================================================
--- incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp (original)
+++ incubator/mesos/trunk/src/third_party/libprocess/reliable.hpp Sun Jun 5 05:24:28 2011
@@ -15,6 +15,16 @@ public:
protected:
/**
+ * Sequence number of current message.
+ */
+ virtual bool seq() const;
+
+ /**
+ * Whether or not current message has been seen before.
+ */
+ virtual bool duplicate() const;
+
+ /**
* Update PID 'old' to 'cur' so that unsent messages will be
* redirected appropriately.
* @param old the existing PID
@@ -38,11 +48,32 @@ protected:
*/
virtual void rsend(const PID &to, MSGID id, const char *data, size_t length);
+ /**
+ * Relay a _reliable_ message. The intermediate destination does not
+ * send an ack.
+ * @param via intermediate destination
+ * @param to destination
+ * @param id message id
+ */
virtual void relay(const PID &via, const PID &to, MSGID id);
+ /**
+ * Relay a _reliable_ message with data. The intermediate
+ * destination does not send an ack.
+ * @param via intermediatedestination
+ * @param to destination
+ * @param id message id
+ * @param data payload
+ * @param length payload length
+ */
virtual void relay(const PID &via, const PID &to, MSGID id, const char *data, size_t length);
- virtual bool duplicate() const;
+ /**
+ * Forward the current _reliable_ message to PID. The destination will
+ * send an ack to the sender.
+ * @param to destination
+ */
+ virtual void forward(const PID &to);
/* Blocks for message at most specified seconds. */
virtual MSGID receive(time_t);