From f5178cc73ffcd480f7303ecb77d2f393f5d7eb9f Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Thu, 30 Aug 2012 13:00:04 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-4005 - pluggable lockers; move shared file locker from kahadb package and improve javadocs git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1378917 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/broker/Locker.java | 4 +++- .../apache/activemq/store/{kahadb => }/SharedFileLocker.java | 4 ++-- .../activemq/store/kahadb/KahaDBPersistenceAdapter.java | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) rename activemq-core/src/main/java/org/apache/activemq/store/{kahadb => }/SharedFileLocker.java (97%) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/Locker.java b/activemq-core/src/main/java/org/apache/activemq/broker/Locker.java index 860455d04d..6415def641 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/Locker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/Locker.java @@ -56,7 +56,9 @@ public interface Locker extends Service { /** - * Configure the locker with the persistence adapter currently used + * Optionally configure the locker with the persistence adapter currently used + * You can use persistence adapter configuration details like, data directory + * datasource, etc. to be used by the locker * * @param persistenceAdapter * @throws IOException diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/SharedFileLocker.java b/activemq-core/src/main/java/org/apache/activemq/store/SharedFileLocker.java similarity index 97% rename from activemq-core/src/main/java/org/apache/activemq/store/kahadb/SharedFileLocker.java rename to activemq-core/src/main/java/org/apache/activemq/store/SharedFileLocker.java index f2bc7215ef..68c95aa276 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/SharedFileLocker.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/SharedFileLocker.java @@ -14,10 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.store.kahadb; +package org.apache.activemq.store; import org.apache.activemq.broker.AbstractLocker; -import org.apache.activemq.store.PersistenceAdapter; +import org.apache.activemq.store.kahadb.MessageDatabase; import org.apache.activemq.util.ServiceStopper; import org.apache.kahadb.util.LockFile; import org.slf4j.Logger; diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java index 65c5b8fb74..3462703149 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java @@ -30,6 +30,7 @@ import org.apache.activemq.protobuf.Buffer; import org.apache.activemq.broker.Locker; import org.apache.activemq.store.MessageStore; import org.apache.activemq.store.PersistenceAdapter; +import org.apache.activemq.store.SharedFileLocker; import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TransactionStore; import org.apache.activemq.store.kahadb.data.KahaLocalTransactionId;