From 03c3f6edb2b17841053250bda46fde1054d32d67 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 6 Aug 2008 21:17:19 +0000 Subject: - Added OutputTask::hasOutput() test. - Cluster only sends doOutput events when hasOutput() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683416 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/OutputTask.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpp/src/qpid/sys/OutputTask.h') diff --git a/cpp/src/qpid/sys/OutputTask.h b/cpp/src/qpid/sys/OutputTask.h index 109765b8c3..005ae7dbc4 100644 --- a/cpp/src/qpid/sys/OutputTask.h +++ b/cpp/src/qpid/sys/OutputTask.h @@ -28,7 +28,17 @@ namespace sys { { public: virtual ~OutputTask() {} + /** Generate some output. + *@return true if output was generated, false if there is no work to do. + */ virtual bool doOutput() = 0; + + /** Check if there may be work to do, but don't do it. + * @return True if there may be work to do, false if there is none. + * Can to return a false positive, to allow implementations to do a + * faster check than doOutput(). Must never return a false negative. + */ + virtual bool hasOutput() = 0; }; } -- cgit v1.2.1