From do-not-reply at jboss.org Thu May 26 11:38:46 2011 Content-Type: multipart/mixed; boundary="===============8446420202311789308==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r10742 - in trunk: hornetq-core/src/main/java/org/hornetq/core/config/impl and 3 other directories. Date: Thu, 26 May 2011 11:38:46 -0400 Message-ID: <201105261538.p4QFckjO003907@svn01.web.mwc.hst.phx2.redhat.com> --===============8446420202311789308== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2011-05-26 11:38:46 -0400 (Thu, 26 May 2011) New Revision: 10742 Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/config/Configuration.j= ava trunk/hornetq-core/src/main/java/org/hornetq/core/config/impl/Configurat= ionImpl.java trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileCon= figurationParser.java trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSeq= uentialFileFactory.java trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncSp= eedTest.java trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integratio= n/logging/LogDelegateTest.java Log: HORNETQ-698 Remove journal constants from ConfigurationImpl. Adjust referen= ces. Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/config/Configur= ation.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/hornetq-core/src/main/java/org/hornetq/core/config/Configuration.= java 2011-05-26 15:17:04 UTC (rev 10741) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/config/Configuration.= java 2011-05-26 15:38:46 UTC (rev 10742) @@ -29,20 +29,20 @@ import org.hornetq.spi.core.logging.LogDelegateFactory; = /** - * = + * * A Configuration is used to configure HornetQ servers. - * = + * * @author Tim Fox * */ public interface Configuration extends Serializable { // General attributes -------------------------------------------------= ------------------ - = - = + + /** To be used on dependency management on the application server */ String getName(); - = + /** To be used on dependency management on the application server */ void setName(String name); = @@ -204,7 +204,7 @@ * Sets whether this server is manageable using JMX or not. */ void setJMXManagementEnabled(boolean enabled); - = + /** * Returns the domain used by JMX MBeans (provided JMX management is en= abled). *
@@ -214,7 +214,7 @@ = /** * Sets the domain used by JMX MBeans (provided JMX management is enabl= ed). - * = + * * Changing this JMX domain is required if multiple HornetQ servers are= run inside * the same JVM and all servers are using the same MBeanServer. */ @@ -280,7 +280,7 @@ = /** * Returns the name of the connector used to connect to the live node -= only used when using shared nothing (shared store =3D false). - *
= + *
*/ String getLiveConnectorName(); = @@ -587,7 +587,7 @@ /** * Returns the timeout (in nanoseconds) used to flush buffers in the AI= O queue. *
- * Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO}. + * Default value is {@value org.hornetq.core.journal.impl.JournalConsta= nts#DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO}. */ int getJournalBufferTimeout_AIO(); = @@ -599,7 +599,7 @@ /** * Returns the buffer size (in bytes) for AIO. *
- * Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_JOURNAL_BUFFER_SIZE_AIO}. + * Default value is {@value org.hornetq.core.journal.impl.JournalConsta= nts#DEFAULT_JOURNAL_BUFFER_SIZE_AIO}. */ int getJournalBufferSize_AIO(); = @@ -623,7 +623,7 @@ /** * Returns the timeout (in nanoseconds) used to flush buffers in the NI= O. *
- * Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO}. + * Default value is {@value org.hornetq.core.journal.impl.JournalConsta= nts#DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO}. */ int getJournalBufferTimeout_NIO(); = @@ -635,7 +635,7 @@ /** * Returns the buffer size (in bytes) for NIO. *
- * Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_JOURNAL_BUFFER_SIZE_NIO}. + * Default value is {@value org.hornetq.core.journal.impl.JournalConsta= nts#DEFAULT_JOURNAL_BUFFER_SIZE_NIO}. */ int getJournalBufferSize_NIO(); = @@ -737,7 +737,7 @@ void setWildcardRoutingEnabled(boolean enabled); = /** - * Returns the timeout (in milliseconds) after which transactions is re= moved = + * Returns the timeout (in milliseconds) after which transactions is re= moved * from the resource manager after it was created. *
* Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_TRANSACTION_TIMEOUT}. @@ -745,7 +745,7 @@ long getTransactionTimeout(); = /** - * Sets the timeout (in milliseconds) after which transactions is remov= ed = + * Sets the timeout (in milliseconds) after which transactions is remov= ed * from the resource manager after it was created. */ void setTransactionTimeout(long timeout); @@ -771,7 +771,7 @@ = /** * Sets the sample period to take message counter snapshot. - * = + * * @param period value must be greater than 1000ms */ void setMessageCounterSamplePeriod(long period); @@ -785,13 +785,13 @@ = /** * Sets the maximum number of days kept in memory for message counter. - * = + * * @param maxDayHistory value must be greater than 0 */ void setMessageCounterMaxDayHistory(int maxDayHistory); = /** - * Returns the frequency (in milliseconds) to scan transactions to det= ect which transactions = + * Returns the frequency (in milliseconds) to scan transactions to det= ect which transactions * have timed out. *
* Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD}. @@ -799,13 +799,13 @@ long getTransactionTimeoutScanPeriod(); = /** - * Sets the frequency (in milliseconds) to scan transactions to detect= which transactions = + * Sets the frequency (in milliseconds) to scan transactions to detect= which transactions * have timed out. */ void setTransactionTimeoutScanPeriod(long period); = /** - * Returns the frequency (in milliseconds) to scan messages to detect = which messages = + * Returns the frequency (in milliseconds) to scan messages to detect = which messages * have expired. *
* Default value is {@value org.hornetq.core.config.impl.ConfigurationI= mpl#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}. @@ -813,7 +813,7 @@ long getMessageExpiryScanPeriod(); = /** - * Sets the frequency (in milliseconds) to scan messages to detect whi= ch messages = + * Sets the frequency (in milliseconds) to scan messages to detect whi= ch messages * have expired. */ void setMessageExpiryScanPeriod(long messageExpiryScanPeriod); @@ -831,7 +831,7 @@ void setMessageExpiryThreadPriority(int messageExpiryThreadPriority); = /** - * = + * * @return A list of AddressSettings per matching to be deployed to the= address settings repository */ Map getAddressesSettings(); @@ -842,25 +842,25 @@ void setAddressesSettings(Map addressesSetting= s); = /** - * = + * * @param roles a list of roles per matching */ void setSecurityRoles(Map> roles); = /** - * = + * * @return a list of roles per matching */ Map> getSecurityRoles(); = /** - * = - * @param = + * + * @param */ void setConnectorServiceConfigurations(List configs); /** - * = - * @return = + * + * @return */ List getConnectorServiceConfigurations(); = Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/config/impl/Con= figurationImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/hornetq-core/src/main/java/org/hornetq/core/config/impl/Configura= tionImpl.java 2011-05-26 15:17:04 UTC (rev 10741) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/config/impl/Configura= tionImpl.java 2011-05-26 15:38:46 UTC (rev 10742) @@ -31,6 +31,7 @@ import org.hornetq.core.config.ConnectorServiceConfiguration; import org.hornetq.core.config.CoreQueueConfiguration; import org.hornetq.core.config.DivertConfiguration; +import org.hornetq.core.journal.impl.JournalConstants; import org.hornetq.core.logging.impl.JULLogDelegateFactory; import org.hornetq.core.security.Role; import org.hornetq.core.server.JournalType; @@ -109,16 +110,8 @@ = public static final int DEFAULT_JOURNAL_MAX_IO_AIO =3D 500; = - public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO =3D (int)(10= 00000000d / 2000); - - public static final int DEFAULT_JOURNAL_BUFFER_SIZE_AIO =3D 490 * 1024; - public static final int DEFAULT_JOURNAL_MAX_IO_NIO =3D 1; = - public static final int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO =3D (int)(10= 00000000d / 300); - - public static final int DEFAULT_JOURNAL_BUFFER_SIZE_NIO =3D 490 * 1024; - public static final boolean DEFAULT_JOURNAL_LOG_WRITE_RATE =3D false; = public static final int DEFAULT_JOURNAL_PERF_BLAST_PAGES =3D -1; @@ -157,7 +150,7 @@ public static final int DEFAULT_ID_CACHE_SIZE =3D 2000; = public static final boolean DEFAULT_PERSIST_ID_CACHE =3D true; - = + public static final boolean DEFAULT_CLUSTER_DUPLICATE_DETECTION =3D tru= e; = public static final boolean DEFAULT_CLUSTER_FORWARD_WHEN_NO_CONSUMERS = =3D false; @@ -185,7 +178,7 @@ public static final String DEFAULT_LOG_DELEGATE_FACTORY_CLASS_NAME =3D = JULLogDelegateFactory.class.getCanonicalName(); = // Attributes ---------------------------------------------------------= -------------------- - = + protected String name =3D "ConfigurationImpl::" + System.identityHashCo= de(this); = protected boolean clustered =3D ConfigurationImpl.DEFAULT_CLUSTERED; @@ -231,7 +224,7 @@ protected String logDelegateFactoryClassName =3D ConfigurationImpl.DEFA= ULT_LOG_DELEGATE_FACTORY_CLASS_NAME; = protected List interceptorClassNames =3D new ArrayList(= ); - = + protected Map connectorConfigs =3D new = HashMap(); = protected Set acceptorConfigs =3D new HashSet(); @@ -284,15 +277,15 @@ = protected int journalMaxIO_AIO =3D ConfigurationImpl.DEFAULT_JOURNAL_MA= X_IO_AIO; = - protected int journalBufferTimeout_AIO =3D ConfigurationImpl.DEFAULT_JO= URNAL_BUFFER_TIMEOUT_AIO; + protected int journalBufferTimeout_AIO =3D JournalConstants.DEFAULT_JOU= RNAL_BUFFER_TIMEOUT_AIO; = - protected int journalBufferSize_AIO =3D ConfigurationImpl.DEFAULT_JOURN= AL_BUFFER_SIZE_AIO; + protected int journalBufferSize_AIO =3D JournalConstants.DEFAULT_JOURNA= L_BUFFER_SIZE_AIO; = protected int journalMaxIO_NIO =3D ConfigurationImpl.DEFAULT_JOURNAL_MA= X_IO_NIO; = - protected int journalBufferTimeout_NIO =3D ConfigurationImpl.DEFAULT_JO= URNAL_BUFFER_TIMEOUT_NIO; + protected int journalBufferTimeout_NIO =3D JournalConstants.DEFAULT_JOU= RNAL_BUFFER_TIMEOUT_NIO; = - protected int journalBufferSize_NIO =3D ConfigurationImpl.DEFAULT_JOURN= AL_BUFFER_SIZE_NIO; + protected int journalBufferSize_NIO =3D JournalConstants.DEFAULT_JOURNA= L_BUFFER_SIZE_NIO; = protected boolean logJournalWriteRate =3D ConfigurationImpl.DEFAULT_JOU= RNAL_LOG_WRITE_RATE; = @@ -356,7 +349,7 @@ return allowAutoFailBack; } = - public void setAllowAutoFailBack(boolean allowAutoFailBack) + public void setAllowAutoFailBack(final boolean allowAutoFailBack) { this.allowAutoFailBack =3D allowAutoFailBack; } @@ -513,7 +506,7 @@ { this.liveConnectorName =3D liveConnectorName; } - = + public GroupingHandlerConfiguration getGroupingHandlerConfiguration() { return groupingHandlerConfiguration; @@ -894,7 +887,7 @@ return failoverOnServerShutdown; } = - public void setFailoverOnServerShutdown(boolean failoverOnServerShutdow= n) + public void setFailoverOnServerShutdown(final boolean failoverOnServerS= hutdown) { this.failoverOnServerShutdown =3D failoverOnServerShutdown; } @@ -1359,7 +1352,7 @@ = public List getConnectorServiceConfigura= tions() { - return this.connectorServiceConfigurations; + return connectorServiceConfigurations; } = public long getFailbackDelay() @@ -1367,14 +1360,14 @@ return failbackDelay; } = - public void setFailbackDelay(long failbackDelay) + public void setFailbackDelay(final long failbackDelay) { this.failbackDelay =3D failbackDelay; } = public void setConnectorServiceConfigurations(final List configs) { - this.connectorServiceConfigurations =3D configs; + connectorServiceConfigurations =3D configs; } = /* (non-Javadoc) @@ -1388,7 +1381,7 @@ /* (non-Javadoc) * @see org.hornetq.core.config.Configuration#setName(java.lang.String) */ - public void setName(String name) + public void setName(final String name) { this.name =3D name; } Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/= FileConfigurationParser.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileCo= nfigurationParser.java 2011-05-26 15:17:04 UTC (rev 10741) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileCo= nfigurationParser.java 2011-05-26 15:38:46 UTC (rev 10742) @@ -28,11 +28,18 @@ import org.hornetq.api.core.SimpleString; import org.hornetq.api.core.TransportConfiguration; import org.hornetq.api.core.client.HornetQClient; -import org.hornetq.core.config.*; +import org.hornetq.core.config.BridgeConfiguration; +import org.hornetq.core.config.BroadcastGroupConfiguration; +import org.hornetq.core.config.ClusterConnectionConfiguration; +import org.hornetq.core.config.Configuration; +import org.hornetq.core.config.ConnectorServiceConfiguration; +import org.hornetq.core.config.CoreQueueConfiguration; +import org.hornetq.core.config.DivertConfiguration; import org.hornetq.core.config.impl.ConfigurationImpl; import org.hornetq.core.config.impl.FileConfiguration; import org.hornetq.core.config.impl.Validators; import org.hornetq.core.journal.impl.AIOSequentialFileFactory; +import org.hornetq.core.journal.impl.JournalConstants; import org.hornetq.core.logging.Logger; import org.hornetq.core.security.Role; import org.hornetq.core.server.JournalType; @@ -139,7 +146,7 @@ /** * @param validateAIO the validateAIO to set */ - public void setValidateAIO(boolean validateAIO) + public void setValidateAIO(final boolean validateAIO) { this.validateAIO =3D validateAIO; } @@ -479,14 +486,14 @@ = int journalBufferTimeout =3D XMLConfigurationUtil.getInteger(e, "journal-= buffer-timeout", - config.ge= tJournalType() =3D=3D JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURN= AL_BUFFER_TIMEOUT_AIO - = : ConfigurationImpl.DEFAULT_JOURNAL_BU= FFER_TIMEOUT_NIO, + config.ge= tJournalType() =3D=3D JournalType.ASYNCIO ? JournalConstants.DEFAULT_JOURNA= L_BUFFER_TIMEOUT_AIO + = : JournalConstants.DEFAULT_JOURNAL_BUF= FER_TIMEOUT_NIO, Validator= s.GT_ZERO); = int journalBufferSize =3D XMLConfigurationUtil.getInteger(e, "journal-buf= fer-size", - config.getJo= urnalType() =3D=3D JournalType.ASYNCIO ? ConfigurationImpl.DEFAULT_JOURNAL_= BUFFER_SIZE_AIO - = : ConfigurationImpl.DEFAULT_JOURNAL_BUFFE= R_SIZE_NIO, + config.getJo= urnalType() =3D=3D JournalType.ASYNCIO ? JournalConstants.DEFAULT_JOURNAL_B= UFFER_SIZE_AIO + = : JournalConstants.DEFAULT_JOURNAL_BUFFER= _SIZE_NIO, Validators.G= T_ZERO); = int journalMaxIO =3D XMLConfigurationUtil.getInteger(e, @@ -1206,7 +1213,7 @@ mainConfig.getBridgeConfigurations().add(config); } = - private void getStaticConnectors(List staticConnectorNames, Nod= e child) + private void getStaticConnectors(final List staticConnectorName= s, final Node child) { NodeList children2 =3D ((Element)child).getElementsByTagName("connec= tor-ref"); = Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl= /AIOSequentialFileFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSe= quentialFileFactory.java 2011-05-26 15:17:04 UTC (rev 10741) +++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AIOSe= quentialFileFactory.java 2011-05-26 15:38:46 UTC (rev 10742) @@ -54,8 +54,8 @@ public AIOSequentialFileFactory(final String journalDir) { this(journalDir, - JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, - JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO, + JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO, + JournalConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO, false); } = Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl= /SyncSpeedTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncS= peedTest.java 2011-05-26 15:17:04 UTC (rev 10741) +++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncS= peedTest.java 2011-05-26 15:38:46 UTC (rev 10742) @@ -27,11 +27,8 @@ import org.hornetq.core.logging.Logger; = /** - * A SyncSpeedTest - * = - * This class just provides some diagnostics on how fast your disk can sync - * Useful when determining performance issues - * + * SyncSpeedTest provides diagnostics on how fast your disk can sync.

+ * It is used to investigate performance issues. * @author Tim Fox fox * * Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/int= egration/logging/LogDelegateTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integrati= on/logging/LogDelegateTest.java 2011-05-26 15:17:04 UTC (rev 10741) +++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integrati= on/logging/LogDelegateTest.java 2011-05-26 15:38:46 UTC (rev 10742) @@ -16,7 +16,6 @@ import junit.framework.Assert; = import org.hornetq.core.config.Configuration; -import org.hornetq.core.config.impl.ConfigurationImpl; import org.hornetq.core.logging.Logger; import org.hornetq.core.logging.impl.JULLogDelegate; import org.hornetq.core.logging.impl.JULLogDelegateFactory; --===============8446420202311789308==--