summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ConnectionMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/cluster/ConnectionMap.cpp')
-rw-r--r--cpp/src/qpid/cluster/ConnectionMap.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/ConnectionMap.cpp b/cpp/src/qpid/cluster/ConnectionMap.cpp
index 1a49a4d663..ed2fa94412 100644
--- a/cpp/src/qpid/cluster/ConnectionMap.cpp
+++ b/cpp/src/qpid/cluster/ConnectionMap.cpp
@@ -62,6 +62,12 @@ ConnectionMap::ConnectionPtr ConnectionMap::get(const ConnectionId& id) {
return i->second;
}
+ConnectionMap::ConnectionPtr ConnectionMap::getLocal(const ConnectionId& id) {
+ if (id.getMember() != cluster.getId()) return 0;
+ Map::const_iterator i = map.find(id);
+ return i == map.end() ? 0 : i->second;
+}
+
ConnectionMap::Vector ConnectionMap::values() const {
Vector result(map.size());
std::transform(map.begin(), map.end(), result.begin(),