summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ExpiryPolicy.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2011-06-15 20:15:51 +0000
committerAlan Conway <aconway@apache.org>2011-06-15 20:15:51 +0000
commit4cdf746f5bb38db60821047c3393f89f15b26f1e (patch)
tree610a404288b464a2225668c128fa77a84020ea62 /cpp/src/qpid/broker/ExpiryPolicy.cpp
parent8034affaba71c0d991bfe1fff5de537f73d0f404 (diff)
downloadqpid-python-4cdf746f5bb38db60821047c3393f89f15b26f1e.tar.gz
QPID-3280: Performance problem with TTL messages.
When sending a large number of messages with nonzero TTLs to a cluster, overall message throughput drops by around 20-30% compared to messages with TTL 0. The previous approach to TTL in the cluster is replaced with a simpler "cluster clock". Also QueueCleaner is executed in the cluster timer, and modified to be deterministic in a cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1136170 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ExpiryPolicy.cpp')
-rw-r--r--cpp/src/qpid/broker/ExpiryPolicy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/qpid/broker/ExpiryPolicy.cpp b/cpp/src/qpid/broker/ExpiryPolicy.cpp
index 64a12d918a..62cb3fc116 100644
--- a/cpp/src/qpid/broker/ExpiryPolicy.cpp
+++ b/cpp/src/qpid/broker/ExpiryPolicy.cpp
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -27,12 +27,12 @@ namespace broker {
ExpiryPolicy::~ExpiryPolicy() {}
-void ExpiryPolicy::willExpire(Message&) {}
-
bool ExpiryPolicy::hasExpired(Message& m) {
return m.getExpiration() < sys::AbsTime::now();
}
-void ExpiryPolicy::forget(Message&) {}
+sys::AbsTime ExpiryPolicy::getCurrentTime() {
+ return sys::AbsTime::now();
+}
}} // namespace qpid::broker