activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r813469 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: broker/region/policy/ plugin/ store/amq/ store/journal/ store/kahadaptor/ store/kahadb/ usage/
Date Thu, 10 Sep 2009 15:05:56 GMT
Author: gtully
Date: Thu Sep 10 15:05:55 2009
New Revision: 813469

URL: http://svn.apache.org/viewvc?rev=813469&view=rev
Log:
expose journal writeBatchSize and tidy up xbean annotations

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.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/journal/JournalPersistenceAdapterFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java
Thu Sep 10 15:05:55 2009
@@ -286,6 +286,7 @@
     }
 
     /**
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
      */
     public void setMemoryLimit(long memoryLimit) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/DiscardingDLQBrokerPlugin.java
Thu Sep 10 15:05:55 2009
@@ -27,7 +27,7 @@
 
 /**
  * @author Filip Hanik
- *  @org.apache.xbean.XBean element="discardingDLQBrokerPlugin"
+ * @org.apache.xbean.XBean element="discardingDLQBrokerPlugin"
  * @version 1.0
  */
 public class DiscardingDLQBrokerPlugin implements BrokerPlugin {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/plugin/ForcePersistencyModeBroker.java
Thu Sep 10 15:05:55 2009
@@ -30,6 +30,7 @@
  * 
  * Useful, if you have set the broker usage policy to process ONLY persistent or ONLY non-persistent
  * messages. 
+ * @org.apache.xbean.XBean element="forcePersistencyModeBroker"
  */
 public class ForcePersistencyModeBroker extends BrokerFilter{
   public static Log log = LogFactory.getLog(ForcePersistencyModeBroker.class);

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=813469&r1=813468&r2=813469&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 Sep 10 15:05:55 2009
@@ -798,11 +798,9 @@
         return maxCheckpointMessageAddSize;
     }
 
-    /**
-     * When set using XBean, you can use values such as: "20
-     * mb", "1024 kb", or "1 gb"
-     * 
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
+    /** 
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
+     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
      */
     public void setMaxCheckpointMessageAddSize(int maxCheckpointMessageAddSize) {
         this.maxCheckpointMessageAddSize = maxCheckpointMessageAddSize;
@@ -857,11 +855,9 @@
 	}
 
 	 /**
-     * When set using XBean, you can use values such as: "20
-     * mb", "1024 kb", or "1 gb"
-     * 
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
-     */
+      * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
+      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
+      */
 	public void setMaxFileLength(int maxFileLength) {
 		this.maxFileLength = maxFileLength;
 	}
@@ -911,9 +907,7 @@
     }
 
     /**
-     * When set using XBean, you can use values such as: "20
-     * mb", "1024 kb", or "1 gb"
-     * 
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
      */
     public void setIndexPageSize(int indexPageSize) {
@@ -933,9 +927,7 @@
     }
 
     /**
-     * When set using XBean, you can use values such as: "20
-     * mb", "1024 kb", or "1 gb"
-     * 
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
      */
     public void setMaxReferenceFileLength(int maxReferenceFileLength) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
Thu Sep 10 15:05:55 2009
@@ -81,7 +81,7 @@
 
     /**
      * Sets the size of the journal log files
-     * 
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
      */
     public void setJournalLogFileSize(int journalLogFileSize) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
Thu Sep 10 15:05:55 2009
@@ -282,7 +282,7 @@
 	}
 
     /**
-     * @param maxDataFileLength the maxDataFileLength to set
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
      */
     public void setMaxDataFileLength(long maxDataFileLength) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapter.java
Thu Sep 10 15:05:55 2009
@@ -34,7 +34,7 @@
  * {@link Journal} and then check pointing asynchronously on a timeout with some
  * other long term persistent storage.
  * 
- * @org.apache.xbean.XBean element="KahaDB"
+ * @org.apache.xbean.XBean element="kahaDB"
  * @version $Revision: 1.17 $
  */
 public class KahaDBPersistenceAdapter implements PersistenceAdapter {
@@ -193,19 +193,16 @@
      * Get the journalMaxFileLength
      * @return the journalMaxFileLength
      */
-    public long getJournalMaxFileLength() {
+    public int getJournalMaxFileLength() {
         return this.letter.getJournalMaxFileLength();
     }
 
     /**
-     * @param journalMaxFileLength which is rounded to an integer
-     * When set using XBean, you can use values such as: "20
-     * mb", "1024 kb", or "1 gb"
-     * 
-     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
+     * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryIntPropertyEditor"
      */
-    public void setJournalMaxFileLength(long journalMaxFileLength) {
-        this.letter.setJournalMaxFileLength(Long.valueOf(journalMaxFileLength).intValue());
+    public void setJournalMaxFileLength(int journalMaxFileLength) {
+        this.letter.setJournalMaxFileLength(journalMaxFileLength);
     }
 
     /**
@@ -257,6 +254,22 @@
     }
 
     /**
+     * Get the journalMaxWriteBatchSize
+     * @return the journalMaxWriteBatchSize
+     */
+    public int getJournalMaxWriteBatchSize() {
+        return this.letter.getJournalMaxWriteBatchSize();
+    }
+
+    /**
+     * Set the journalMaxWriteBatchSize
+     * @param journalMaxWriteBatchSize the journalMaxWriteBatchSize to set
+     */
+    public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize) {
+        this.letter.setJournalMaxWriteBatchSize(journalMaxWriteBatchSize);
+    }
+    
+    /**
      * Get the enableIndexWriteAsync
      * @return the enableIndexWriteAsync
      */

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
Thu Sep 10 15:05:55 2009
@@ -25,7 +25,6 @@
 import java.util.Set;
 import java.util.Map.Entry;
 
-import org.apache.activeio.journal.Journal;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Thu Sep 10 15:05:55 2009
@@ -142,6 +142,7 @@
     long checkpointInterval = 5*1000;
     long cleanupInterval = 30*1000;
     int journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH;
+    int journalMaxWriteBatchSize = Journal.DEFAULT_MAX_WRITE_BATCH_SIZE;
     boolean enableIndexWriteAsync = false;
     int setIndexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE; 
     
@@ -1337,9 +1338,18 @@
         Journal manager = new Journal();
         manager.setDirectory(directory);
         manager.setMaxFileLength(getJournalMaxFileLength());
+        manager.setWriteBatchSize(getJournalMaxWriteBatchSize());
         return manager;
     }
 
+    public int getJournalMaxWriteBatchSize() {
+        return journalMaxWriteBatchSize;
+    }
+    
+    public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize) {
+        this.journalMaxWriteBatchSize = journalMaxWriteBatchSize;
+    }
+
     public File getDirectory() {
         return directory;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java?rev=813469&r1=813468&r2=813469&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java Thu Sep
10 15:05:55 2009
@@ -134,8 +134,8 @@
     /**
      * Sets the memory limit in bytes. Setting the limit in bytes will set the
      * usagePortion to 0 since the UsageManager is not going to be portion based
-     * off the parent. When set using XBean, you can use values such as: "20
-     * mb", "1024 kb", or "1 gb"
+     * off the parent.
+     * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
      * 
      * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
      */



Mime
View raw message