diff options
| author | Alan Conway <aconway@apache.org> | 2012-07-05 19:58:07 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-07-05 19:58:07 +0000 |
| commit | 6759a1bca2fd067dfb18a9c08218f2ceef73b60f (patch) | |
| tree | 98bd1ec748c716a93195884a0e1ede71c633d481 /qpid | |
| parent | fc77ff9ffb9c30742777fa875c44c833eea1c4f5 (diff) | |
| download | qpid-python-6759a1bca2fd067dfb18a9c08218f2ceef73b60f.tar.gz | |
NO-JIRA: Remove dead code.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1357851 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
| -rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/ha.mk | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/BrokerReplicator.h | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/Counter.h | 57 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/QueueReplicator.cpp | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/ha/QueueReplicator.h | 2 |
6 files changed, 0 insertions, 63 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index b65c2b206a..e27aca0630 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -639,7 +639,6 @@ if (BUILD_HA) qpid/ha/BrokerReplicator.h qpid/ha/ConnectionObserver.cpp qpid/ha/ConnectionObserver.h - qpid/ha/Counter.h qpid/ha/HaBroker.cpp qpid/ha/HaBroker.h qpid/ha/HaPlugin.cpp diff --git a/qpid/cpp/src/ha.mk b/qpid/cpp/src/ha.mk index ad41db9b0e..906dd775bd 100644 --- a/qpid/cpp/src/ha.mk +++ b/qpid/cpp/src/ha.mk @@ -32,7 +32,6 @@ ha_la_SOURCES = \ qpid/ha/BrokerReplicator.h \ qpid/ha/ConnectionObserver.cpp \ qpid/ha/ConnectionObserver.h \ - qpid/ha/Counter.h \ qpid/ha/HaBroker.cpp \ qpid/ha/HaBroker.h \ qpid/ha/HaPlugin.cpp \ diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.h b/qpid/cpp/src/qpid/ha/BrokerReplicator.h index 8289ad7e9d..35ffdd0cd8 100644 --- a/qpid/cpp/src/qpid/ha/BrokerReplicator.h +++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.h @@ -22,7 +22,6 @@ * */ -#include "Counter.h" #include "types.h" #include "ReplicationTest.h" #include "qpid/broker/Exchange.h" diff --git a/qpid/cpp/src/qpid/ha/Counter.h b/qpid/cpp/src/qpid/ha/Counter.h deleted file mode 100644 index 04dd672126..0000000000 --- a/qpid/cpp/src/qpid/ha/Counter.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef QPID_HA_COUNTER_H -#define QPID_HA_COUNTER_H - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * 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 - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/sys/AtomicValue.h" -#include <boost/function.hpp> - -namespace qpid { -namespace ha { - -/** - * Keep a count, call a callback when it reaches 0. - */ -class Counter -{ - public: - Counter(boost::function<void()> f) : callback(f) {} - - void operator++() { ++count; } - - void operator--() { - size_t n = --count; - assert(n != size_t(-1)); // No underflow - if (n == 0) callback(); - } - - size_t get() { return count.get(); } - - Counter& operator=(size_t n) { count = n; return *this; } - - private: - boost::function<void()> callback; - sys::AtomicValue<size_t> count; -}; -}} // namespace qpid::ha - -#endif /*!QPID_HA_COUNTER_H*/ diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp index 70dd91f57f..acac39fcb9 100644 --- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp @@ -19,7 +19,6 @@ * */ -#include "Counter.h" #include "QueueReplicator.h" #include "ReplicatingSubscription.h" #include "qpid/broker/Bridge.h" diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.h b/qpid/cpp/src/qpid/ha/QueueReplicator.h index 2f55e6cc85..6754174076 100644 --- a/qpid/cpp/src/qpid/ha/QueueReplicator.h +++ b/qpid/cpp/src/qpid/ha/QueueReplicator.h @@ -41,8 +41,6 @@ class Deliverable; namespace ha { -class Counter; - /** * Exchange created on a backup broker to replicate a queue on the primary. * |
