activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r583949 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: kaha/impl/async/AsyncDataManager.java store/amq/AMQPersistenceAdapter.java store/amq/AMQPersistenceAdapterFactory.java
Date Thu, 11 Oct 2007 20:58:26 GMT
Author: rajdavies
Date: Thu Oct 11 13:58:25 2007
New Revision: 583949

URL: http://svn.apache.org/viewvc?rev=583949&view=rev
Log:
Expose properties for configuring the asyncDataManager

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java?rev=583949&r1=583948&r2=583949&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
Thu Oct 11 13:58:25 2007
@@ -564,4 +564,12 @@
         this.lastAppendLocation.set(lastSyncedLocation);
     }
 
+	public boolean isUseNio() {
+		return useNio;
+	}
+
+	public void setUseNio(boolean useNio) {
+		this.useNio = useNio;
+	}
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?rev=583949&r1=583948&r2=583949&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
Thu Oct 11 13:58:25 2007
@@ -100,6 +100,9 @@
     private BrokerService brokerService;
     private AtomicLong storeSize = new AtomicLong();
     private boolean persistentIndex=true;
+    private boolean useNio = true;
+    private int maxFileLength = AsyncDataManager.DEFAULT_MAX_FILE_LENGTH;
+
 
     public String getBrokerName() {
         return this.brokerName;
@@ -609,6 +612,8 @@
     protected AsyncDataManager createAsyncDataManager() {
         AsyncDataManager manager = new AsyncDataManager(storeSize);
         manager.setDirectory(new File(directory, "journal"));
+        manager.setMaxFileLength(maxFileLength);
+        manager.setUseNio(useNio);    
         return manager;
     }
 
@@ -706,4 +711,20 @@
     public long size(){
         return storeSize.get();
     }
+
+	public boolean isUseNio() {
+		return useNio;
+	}
+
+	public void setUseNio(boolean useNio) {
+		this.useNio = useNio;
+	}
+
+	public int getMaxFileLength() {
+		return maxFileLength;
+	}
+
+	public void setMaxFileLength(int maxFileLength) {
+		this.maxFileLength = maxFileLength;
+	}
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java?rev=583949&r1=583948&r2=583949&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapterFactory.java
Thu Oct 11 13:58:25 2007
@@ -17,6 +17,8 @@
 package org.apache.activemq.store.amq;
 
 import java.io.File;
+
+import org.apache.activemq.kaha.impl.async.AsyncDataManager;
 import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.activemq.store.PersistenceAdapterFactory;
 import org.apache.activemq.store.ReferenceStoreAdapter;
@@ -39,6 +41,9 @@
     private ReferenceStoreAdapter referenceStoreAdapter;
     private boolean syncOnWrite;
     private boolean persistentIndex=true;
+    private boolean useNio = true;
+    private int maxFileLength = AsyncDataManager.DEFAULT_MAX_FILE_LENGTH;
+
 
     /**
      * @return a AMQPersistenceAdapter
@@ -52,6 +57,8 @@
         result.setSyncOnWrite(isSyncOnWrite());
         result.setPersistentIndex(isPersistentIndex());
         result.setReferenceStoreAdapter(getReferenceStoreAdapter());
+        result.setUseNio(isUseNio());
+        result.setMaxFileLength(getMaxFileLength());
         return result;
     }
 
@@ -146,5 +153,21 @@
 
 	public void setSyncOnWrite(boolean syncOnWrite) {
 		this.syncOnWrite = syncOnWrite;
+	}
+
+	public boolean isUseNio() {
+		return useNio;
+	}
+
+	public void setUseNio(boolean useNio) {
+		this.useNio = useNio;
+	}
+
+	public int getMaxFileLength() {
+		return maxFileLength;
+	}
+
+	public void setMaxFileLength(int maxFileLength) {
+		this.maxFileLength = maxFileLength;
 	}
 }



Mime
View raw message