From ae5abf143b93d388dfa243ab3ff982a50811f29c Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Thu, 18 Jul 2013 20:04:45 +0000 Subject: [PATCH] Adding a container property to the zk node data used by the leveldb replication. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1504626 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/leveldb/replicated/ElectingLevelDBStore.scala | 3 +++ .../apache/activemq/leveldb/replicated/MasterElector.scala | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala index cc09fec396..e7fa916fa3 100644 --- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala @@ -75,6 +75,9 @@ class ElectingLevelDBStore extends ProxyLevelDBStore { var brokerName: String = _ + @BeanProperty + var container: String = _ + @BeanProperty var hostname: String = _ @BeanProperty diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala index 38ec989ec8..6869ca46de 100644 --- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala @@ -10,6 +10,9 @@ class LevelDBNodeState extends NodeState { @JsonProperty var id: String = _ + @JsonProperty + var container: String = _ + @JsonProperty var address: String = _ @@ -23,6 +26,7 @@ class LevelDBNodeState extends NodeState { obj match { case x:LevelDBNodeState => x.id == id && + x.container == container && x.address == address && x.position == position && x.elected == elected @@ -73,6 +77,8 @@ class MasterElector(store: ElectingLevelDBStore) extends ClusteredSingleton[Leve rc.elected = elected rc.position = position rc.address = address + rc.container = store.container + rc.address = address rc }