[hornetq-commits] JBoss hornetq SVN: r9078 - in trunk: src/main/org/hornetq/core/deployers/impl and 4 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Apr 8 07:36:45 EDT 2010
Author: timfox
Date: 2010-04-08 07:36:44 -0400 (Thu, 08 Apr 2010)
New Revision: 9078
Modified:
trunk/src/config/common/schema/hornetq-configuration.xsd
trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
trunk/src/main/org/hornetq/core/settings/impl/AddressSettings.java
trunk/tests/config/ConfigurationTest-full-config.xml
trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-301
Modified: trunk/src/config/common/schema/hornetq-configuration.xsd
===================================================================
--- trunk/src/config/common/schema/hornetq-configuration.xsd 2010-04-08 11:21:40 UTC (rev 9077)
+++ trunk/src/config/common/schema/hornetq-configuration.xsd 2010-04-08 11:36:44 UTC (rev 9078)
@@ -447,7 +447,7 @@
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="max-size-bytes" type="xsd:long">
</xsd:element>
- <xsd:element maxOccurs="1" minOccurs="0" name="page-size-bytes" type="xsd:int">
+ <xsd:element maxOccurs="1" minOccurs="0" name="page-size-bytes" type="xsd:long">
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="address-full-policy" type="addressFullMessagePolicyType">
</xsd:element>
Modified: trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
===================================================================
--- trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2010-04-08 11:21:40 UTC (rev 9077)
+++ trunk/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2010-04-08 11:36:44 UTC (rev 9078)
@@ -707,11 +707,11 @@
}
else if (FileConfigurationParser.MAX_SIZE_BYTES_NODE_NAME.equalsIgnoreCase(child.getNodeName()))
{
- addressSettings.setMaxSizeBytes(Integer.valueOf(child.getTextContent()));
+ addressSettings.setMaxSizeBytes(Long.valueOf(child.getTextContent()));
}
else if (FileConfigurationParser.PAGE_SIZE_BYTES_NODE_NAME.equalsIgnoreCase(child.getNodeName()))
{
- addressSettings.setPageSizeBytes(Integer.valueOf(child.getTextContent()));
+ addressSettings.setPageSizeBytes(Long.valueOf(child.getTextContent()));
}
else if (FileConfigurationParser.MESSAGE_COUNTER_HISTORY_DAY_LIMIT_NODE_NAME.equalsIgnoreCase(child.getNodeName()))
{
Modified: trunk/src/main/org/hornetq/core/settings/impl/AddressSettings.java
===================================================================
--- trunk/src/main/org/hornetq/core/settings/impl/AddressSettings.java 2010-04-08 11:21:40 UTC (rev 9077)
+++ trunk/src/main/org/hornetq/core/settings/impl/AddressSettings.java 2010-04-08 11:36:44 UTC (rev 9078)
@@ -21,7 +21,6 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.settings.Mergeable;
import org.hornetq.utils.BufferHelper;
-import org.hornetq.utils.DataConstants;
/**
* Configuration settings that are applied on the address level
@@ -38,11 +37,11 @@
/**
* defaults used if null, this allows merging
*/
- public static final int DEFAULT_MAX_SIZE_BYTES = -1;
+ public static final long DEFAULT_MAX_SIZE_BYTES = -1;
public static final AddressFullMessagePolicy DEFAULT_ADDRESS_FULL_MESSAGE_POLICY = AddressFullMessagePolicy.PAGE;
- public static final int DEFAULT_PAGE_SIZE = 10 * 1024 * 1024;
+ public static final long DEFAULT_PAGE_SIZE = 10 * 1024 * 1024;
public static final int DEFAULT_MAX_DELIVERY_ATTEMPTS = 10;
@@ -60,7 +59,7 @@
private Long maxSizeBytes = null;
- private Integer pageSizeBytes = null;
+ private Long pageSizeBytes = null;
private Boolean dropMessagesWhenFull = null;
@@ -101,12 +100,12 @@
this.addressFullMessagePolicy = addressFullMessagePolicy;
}
- public int getPageSizeBytes()
+ public long getPageSizeBytes()
{
return pageSizeBytes != null ? pageSizeBytes : AddressSettings.DEFAULT_PAGE_SIZE;
}
- public void setPageSizeBytes(final int pageSize)
+ public void setPageSizeBytes(final long pageSize)
{
pageSizeBytes = pageSize;
}
@@ -262,7 +261,7 @@
maxSizeBytes = BufferHelper.readNullableLong(buffer);
- pageSizeBytes = BufferHelper.readNullableInteger(buffer);
+ pageSizeBytes = BufferHelper.readNullableLong(buffer);
dropMessagesWhenFull = BufferHelper.readNullableBoolean(buffer);
@@ -291,7 +290,7 @@
return BufferHelper.sizeOfNullableSimpleString(addressFullMessagePolicy != null ? addressFullMessagePolicy.toString()
: null) + BufferHelper.sizeOfNullableLong(maxSizeBytes) +
- BufferHelper.sizeOfNullableInteger(pageSizeBytes) +
+ BufferHelper.sizeOfNullableLong(pageSizeBytes) +
BufferHelper.sizeOfNullableBoolean(dropMessagesWhenFull) +
BufferHelper.sizeOfNullableInteger(maxDeliveryAttempts) +
BufferHelper.sizeOfNullableInteger(messageCounterHistoryDayLimit) +
@@ -313,7 +312,7 @@
BufferHelper.writeNullableLong(buffer, maxSizeBytes);
- BufferHelper.writeNullableInteger(buffer, pageSizeBytes);
+ BufferHelper.writeNullableLong(buffer, pageSizeBytes);
BufferHelper.writeNullableBoolean(buffer, dropMessagesWhenFull);
Modified: trunk/tests/config/ConfigurationTest-full-config.xml
===================================================================
--- trunk/tests/config/ConfigurationTest-full-config.xml 2010-04-08 11:21:40 UTC (rev 9077)
+++ trunk/tests/config/ConfigurationTest-full-config.xml 2010-04-08 11:36:44 UTC (rev 9078)
@@ -197,16 +197,16 @@
<dead-letter-address>a1.1</dead-letter-address>
<expiry-address>a1.2</expiry-address>
<redelivery-delay>1</redelivery-delay>
- <max-size-bytes>2</max-size-bytes>
- <page-size-bytes>3</page-size-bytes>
+ <max-size-bytes>81781728121878</max-size-bytes>
+ <page-size-bytes>81738173872337</page-size-bytes>
<message-counter-history-day-limit>4</message-counter-history-day-limit>
</address-setting>
<address-setting match="a2">
<dead-letter-address>a2.1</dead-letter-address>
<expiry-address>a2.2</expiry-address>
<redelivery-delay>5</redelivery-delay>
- <max-size-bytes>6</max-size-bytes>
- <page-size-bytes>7</page-size-bytes>
+ <max-size-bytes>932489234928324</max-size-bytes>
+ <page-size-bytes>7126716262626</page-size-bytes>
<message-counter-history-day-limit>8</message-counter-history-day-limit>
</address-setting>
</address-settings>
Modified: trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2010-04-08 11:21:40 UTC (rev 9077)
+++ trunk/tests/src/org/hornetq/tests/unit/core/config/impl/FileConfigurationTest.java 2010-04-08 11:36:44 UTC (rev 9078)
@@ -268,15 +268,15 @@
assertEquals("a1.1", conf.getAddressesSettings().get("a1").getDeadLetterAddress().toString());
assertEquals("a1.2", conf.getAddressesSettings().get("a1").getExpiryAddress().toString());
assertEquals(1, conf.getAddressesSettings().get("a1").getRedeliveryDelay());
- assertEquals(2, conf.getAddressesSettings().get("a1").getMaxSizeBytes());
- assertEquals(3, conf.getAddressesSettings().get("a1").getPageSizeBytes());
+ assertEquals(81781728121878l, conf.getAddressesSettings().get("a1").getMaxSizeBytes());
+ assertEquals(81738173872337l, conf.getAddressesSettings().get("a1").getPageSizeBytes());
assertEquals(4, conf.getAddressesSettings().get("a1").getMessageCounterHistoryDayLimit());
assertEquals("a2.1", conf.getAddressesSettings().get("a2").getDeadLetterAddress().toString());
assertEquals("a2.2", conf.getAddressesSettings().get("a2").getExpiryAddress().toString());
assertEquals(5, conf.getAddressesSettings().get("a2").getRedeliveryDelay());
- assertEquals(6, conf.getAddressesSettings().get("a2").getMaxSizeBytes());
- assertEquals(7, conf.getAddressesSettings().get("a2").getPageSizeBytes());
+ assertEquals(932489234928324l, conf.getAddressesSettings().get("a2").getMaxSizeBytes());
+ assertEquals(7126716262626l, conf.getAddressesSettings().get("a2").getPageSizeBytes());
assertEquals(8, conf.getAddressesSettings().get("a2").getMessageCounterHistoryDayLimit());
Modified: trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java 2010-04-08 11:21:40 UTC (rev 9077)
+++ trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/AddressSettingsDeployerTest.java 2010-04-08 11:36:44 UTC (rev 9078)
@@ -36,8 +36,8 @@
+ " <expiry-address>ExpiryQueueTest</expiry-address>\n"
+ " <redelivery-delay>100</redelivery-delay>\n"
+ " <max-delivery-attempts>32</max-delivery-attempts>\n"
- + " <max-size-bytes>182381723</max-size-bytes>\n"
- + " <page-size-bytes>2387273</page-size-bytes>\n"
+ + " <max-size-bytes>18238172365765</max-size-bytes>\n"
+ + " <page-size-bytes>2387273767666</page-size-bytes>\n"
+ " <address-full-policy>DROP</address-full-policy>\n"
+ " <message-counter-history-day-limit>1000</message-counter-history-day-limit>\n"
+ " <last-value-queue>true</last-value-queue>\n"
@@ -68,8 +68,8 @@
Assert.assertEquals(new SimpleString("ExpiryQueueTest"), as.getExpiryAddress());
Assert.assertEquals(100, as.getRedeliveryDelay());
Assert.assertEquals(32, as.getMaxDeliveryAttempts());
- Assert.assertEquals(182381723, as.getMaxSizeBytes());
- Assert.assertEquals(2387273, as.getPageSizeBytes());
+ Assert.assertEquals(18238172365765L, as.getMaxSizeBytes());
+ Assert.assertEquals(2387273767666L, as.getPageSizeBytes());
Assert.assertEquals(AddressFullMessagePolicy.DROP, as.getAddressFullMessagePolicy());
Assert.assertEquals(1000, as.getMessageCounterHistoryDayLimit());
Assert.assertTrue(as.isLastValueQueue());
@@ -97,8 +97,8 @@
Assert.assertEquals(new SimpleString("ExpiryQueueTest"), as.getExpiryAddress());
Assert.assertEquals(100, as.getRedeliveryDelay());
Assert.assertEquals(32, as.getMaxDeliveryAttempts());
- Assert.assertEquals(182381723, as.getMaxSizeBytes());
- Assert.assertEquals(2387273, as.getPageSizeBytes());
+ Assert.assertEquals(18238172365765l, as.getMaxSizeBytes());
+ Assert.assertEquals(2387273767666l, as.getPageSizeBytes());
Assert.assertEquals(AddressFullMessagePolicy.DROP, as.getAddressFullMessagePolicy());
Assert.assertEquals(1000, as.getMessageCounterHistoryDayLimit());
Assert.assertTrue(as.isLastValueQueue());
More information about the hornetq-commits
mailing list