Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E82C117543 for ; Tue, 11 Nov 2014 11:00:33 +0000 (UTC) Received: (qmail 66800 invoked by uid 500); 11 Nov 2014 11:00:33 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 66594 invoked by uid 500); 11 Nov 2014 11:00:33 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 66151 invoked by uid 99); 11 Nov 2014 11:00:33 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 11:00:33 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 07EB19ABCFD; Tue, 11 Nov 2014 11:00:33 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: andytaylor@apache.org To: commits@activemq.apache.org Date: Tue, 11 Nov 2014 11:00:57 -0000 Message-Id: <51532aa6adf1495498debc6d7b49f1e4@git.apache.org> In-Reply-To: <8993358cfa3a48d182aa897a718a8a96@git.apache.org> References: <8993358cfa3a48d182aa897a718a8a96@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [27/51] [partial] activemq-6 git commit: ACTIVEMQ6-2 Update to HQ master http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-selector/src/main/java/org/hornetq/selector/filter/BinaryExpression.java ---------------------------------------------------------------------- diff --git a/hornetq-selector/src/main/java/org/hornetq/selector/filter/BinaryExpression.java b/hornetq-selector/src/main/java/org/hornetq/selector/filter/BinaryExpression.java index 8e700a4..476090e 100755 --- a/hornetq-selector/src/main/java/org/hornetq/selector/filter/BinaryExpression.java +++ b/hornetq-selector/src/main/java/org/hornetq/selector/filter/BinaryExpression.java @@ -53,29 +53,49 @@ public abstract class BinaryExpression implements Expression } /** - * TODO: more efficient hashCode() - * * @see java.lang.Object#hashCode() */ public int hashCode() { - return toString().hashCode(); + int result = left.hashCode(); + result = 31 * result + right.hashCode(); + result = 31 * result + getExpressionSymbol().hashCode(); + return result; } /** - * TODO: more efficient hashCode() - * * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object o) { + if (this == o) + { + return true; + } + + if (o == null || getClass() != o.getClass()) + { + return false; + } + + final BinaryExpression that = (BinaryExpression)o; + + if (!this.getExpressionSymbol().equals(that.getExpressionSymbol())) + { + return false; + } + + if (left != null && !left.equals(that.left)) + { + return false; + } - if (o == null || !this.getClass().equals(o.getClass())) + if (right != null && !right.equals(that.right)) { return false; } - return toString().equals(o.toString()); + return true; } /** http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-selector/src/main/java/org/hornetq/selector/filter/ConstantExpression.java ---------------------------------------------------------------------- diff --git a/hornetq-selector/src/main/java/org/hornetq/selector/filter/ConstantExpression.java b/hornetq-selector/src/main/java/org/hornetq/selector/filter/ConstantExpression.java index 2f4f878..4e50967 100755 --- a/hornetq-selector/src/main/java/org/hornetq/selector/filter/ConstantExpression.java +++ b/hornetq-selector/src/main/java/org/hornetq/selector/filter/ConstantExpression.java @@ -139,36 +139,39 @@ public class ConstantExpression implements Expression } /** - * TODO: more efficient hashCode() - * * @see java.lang.Object#hashCode() */ public int hashCode() { - return toString().hashCode(); + return value != null ? value.hashCode() : 0; } /** - * TODO: more efficient hashCode() - * - * @see java.lang.Object#equals(java.lang.Object) + * @see java.lang.Object#equals(Object) */ - public boolean equals(Object o) + public boolean equals(final Object o) { - - if (o == null || !this.getClass().equals(o.getClass())) + if (this == o) + { + return true; + } + if (o == null || getClass() != o.getClass()) { return false; } - return toString().equals(o.toString()); - + final ConstantExpression that = (ConstantExpression)o; + if (value != null && !value.equals(that.value)) + { + return false; + } + return true; } /** * Encodes the value of string so that it looks like it would look like when * it was provided in a selector. * - * @param string + * @param s * @return */ public static String encodeString(String s) http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-selector/src/main/java/org/hornetq/selector/filter/UnaryExpression.java ---------------------------------------------------------------------- diff --git a/hornetq-selector/src/main/java/org/hornetq/selector/filter/UnaryExpression.java b/hornetq-selector/src/main/java/org/hornetq/selector/filter/UnaryExpression.java index ca55b64..ee77595 100755 --- a/hornetq-selector/src/main/java/org/hornetq/selector/filter/UnaryExpression.java +++ b/hornetq-selector/src/main/java/org/hornetq/selector/filter/UnaryExpression.java @@ -284,29 +284,43 @@ public abstract class UnaryExpression implements Expression } /** - * TODO: more efficient hashCode() - * * @see java.lang.Object#hashCode() */ public int hashCode() { - return toString().hashCode(); + int result = right.hashCode(); + result = 31 * result + getExpressionSymbol().hashCode(); + return result; } /** - * TODO: more efficient hashCode() - * * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object o) { + if (this == o) + { + return true; + } + + if (o == null || getClass() != o.getClass()) + { + return false; + } + + final BinaryExpression that = (BinaryExpression)o; + + if (!this.getExpressionSymbol().equals(that.getExpressionSymbol())) + { + return false; + } - if (o == null || !this.getClass().equals(o.getClass())) + if (right != null && !right.equals(that.right)) { return false; } - return toString().equals(o.toString()); + return true; } /** http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-selector/src/test/java/org/hornetq/selector/SelectorParserTest.java ---------------------------------------------------------------------- diff --git a/hornetq-selector/src/test/java/org/hornetq/selector/SelectorParserTest.java b/hornetq-selector/src/test/java/org/hornetq/selector/SelectorParserTest.java index f42a2cc..1dda085 100755 --- a/hornetq-selector/src/test/java/org/hornetq/selector/SelectorParserTest.java +++ b/hornetq-selector/src/test/java/org/hornetq/selector/SelectorParserTest.java @@ -16,19 +16,19 @@ */ package org.hornetq.selector; -import junit.framework.TestCase; - import org.hornetq.selector.filter.BooleanExpression; import org.hornetq.selector.filter.ComparisonExpression; import org.hornetq.selector.filter.Expression; import org.hornetq.selector.filter.LogicExpression; import org.hornetq.selector.filter.PropertyExpression; import org.hornetq.selector.filter.XPathExpression; +import org.junit.Assert; +import org.junit.Test; /** * @version $Revision: 1.2 $ */ -public class SelectorParserTest extends TestCase +public class SelectorParserTest { public void info(String msg) @@ -36,13 +36,15 @@ public class SelectorParserTest extends TestCase System.out.println(msg); } + @Test public void testParseXPath() throws Exception { BooleanExpression filter = parse("XPATH '//title[@lang=''eng'']'"); - assertTrue("Created XPath expression", filter instanceof XPathExpression); + Assert.assertTrue("Created XPath expression", filter instanceof XPathExpression); info("Expression: " + filter); } + @Test public void testParseWithParensAround() throws Exception { String[] values = {"x = 1 and y = 2", "(x = 1) and (y = 2)", "((x = 1) and (y = 2))"}; @@ -53,13 +55,13 @@ public class SelectorParserTest extends TestCase info("Parsing: " + value); BooleanExpression andExpression = parse(value); - assertTrue("Created LogicExpression expression", andExpression instanceof LogicExpression); + Assert.assertTrue("Created LogicExpression expression", andExpression instanceof LogicExpression); LogicExpression logicExpression = (LogicExpression) andExpression; Expression left = logicExpression.getLeft(); Expression right = logicExpression.getRight(); - assertTrue("Left is a binary filter", left instanceof ComparisonExpression); - assertTrue("Right is a binary filter", right instanceof ComparisonExpression); + Assert.assertTrue("Left is a binary filter", left instanceof ComparisonExpression); + Assert.assertTrue("Right is a binary filter", right instanceof ComparisonExpression); ComparisonExpression leftCompare = (ComparisonExpression) left; ComparisonExpression rightCompare = (ComparisonExpression) right; assertPropertyExpression("left", leftCompare.getLeft(), "x"); @@ -69,9 +71,9 @@ public class SelectorParserTest extends TestCase protected void assertPropertyExpression(String message, Expression expression, String expected) { - assertTrue(message + ". Must be PropertyExpression", expression instanceof PropertyExpression); + Assert.assertTrue(message + ". Must be PropertyExpression", expression instanceof PropertyExpression); PropertyExpression propExp = (PropertyExpression) expression; - assertEquals(message + ". Property name", expected, propExp.getName()); + Assert.assertEquals(message + ". Property name", expected, propExp.getName()); } protected BooleanExpression parse(String text) throws Exception http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-selector/src/test/java/org/hornetq/selector/SelectorTest.java ---------------------------------------------------------------------- diff --git a/hornetq-selector/src/test/java/org/hornetq/selector/SelectorTest.java b/hornetq-selector/src/test/java/org/hornetq/selector/SelectorTest.java index 91df373..67c59e6 100755 --- a/hornetq-selector/src/test/java/org/hornetq/selector/SelectorTest.java +++ b/hornetq-selector/src/test/java/org/hornetq/selector/SelectorTest.java @@ -18,17 +18,17 @@ package org.hornetq.selector; import java.util.HashMap; -import junit.framework.TestCase; - import org.hornetq.selector.filter.BooleanExpression; import org.hornetq.selector.filter.FilterException; import org.hornetq.selector.filter.Filterable; +import org.junit.Assert; +import org.junit.Test; /** * @version $Revision: 1.7 $ */ @SuppressWarnings("unchecked") -public class SelectorTest extends TestCase +public class SelectorTest { class MockMessage implements Filterable @@ -142,6 +142,7 @@ public class SelectorTest extends TestCase } + @Test public void testBooleanSelector() throws Exception { MockMessage message = createMessage(); @@ -151,6 +152,7 @@ public class SelectorTest extends TestCase } + @Test public void testXPathSelectors() throws Exception { MockMessage message = new MockMessage(); @@ -194,6 +196,7 @@ public class SelectorTest extends TestCase } + @Test public void testJMSPropertySelectors() throws Exception { MockMessage message = createMessage(); @@ -214,6 +217,7 @@ public class SelectorTest extends TestCase assertSelector(message, "JMSType = 'crap'", false); } + @Test public void testBasicSelectors() throws Exception { MockMessage message = createMessage(); @@ -225,6 +229,7 @@ public class SelectorTest extends TestCase } + @Test public void testPropertyTypes() throws Exception { MockMessage message = createMessage(); @@ -252,6 +257,7 @@ public class SelectorTest extends TestCase assertSelector(message, "doubleProp = 10", false); } + @Test public void testAndSelectors() throws Exception { MockMessage message = createMessage(); @@ -262,6 +268,7 @@ public class SelectorTest extends TestCase assertSelector(message, "unknown = 'Foo' and anotherUnknown < 200", false); } + @Test public void testOrSelectors() throws Exception { MockMessage message = createMessage(); @@ -273,6 +280,7 @@ public class SelectorTest extends TestCase assertSelector(message, "unknown = 'Foo' or anotherUnknown < 200", false); } + @Test public void testPlus() throws Exception { MockMessage message = createMessage(); @@ -285,6 +293,7 @@ public class SelectorTest extends TestCase assertSelector(message, "name + '!' = 'James!'", true); } + @Test public void testMinus() throws Exception { MockMessage message = createMessage(); @@ -294,6 +303,7 @@ public class SelectorTest extends TestCase assertSelector(message, "rank - 2 > 122", false); } + @Test public void testMultiply() throws Exception { MockMessage message = createMessage(); @@ -303,6 +313,7 @@ public class SelectorTest extends TestCase assertSelector(message, "rank * 2 < 130", false); } + @Test public void testDivide() throws Exception { MockMessage message = createMessage(); @@ -314,6 +325,7 @@ public class SelectorTest extends TestCase } + @Test public void testBetween() throws Exception { MockMessage message = createMessage(); @@ -322,6 +334,7 @@ public class SelectorTest extends TestCase assertSelector(message, "rank between 10 and 120", false); } + @Test public void testIn() throws Exception { MockMessage message = createMessage(); @@ -334,6 +347,7 @@ public class SelectorTest extends TestCase assertSelector(message, "name not in ('Gromit', 'Bob', 'Cheddar')", true); } + @Test public void testIsNull() throws Exception { MockMessage message = createMessage(); @@ -344,6 +358,7 @@ public class SelectorTest extends TestCase assertSelector(message, "name is null", false); } + @Test public void testLike() throws Exception { MockMessage message = createMessage(); @@ -372,6 +387,7 @@ public class SelectorTest extends TestCase /** * Test cases from Mats Henricson */ + @Test public void testMatsHenricsonUseCases() throws Exception { MockMessage message = createMessage(); @@ -394,6 +410,7 @@ public class SelectorTest extends TestCase assertSelector(message, "Command NOT IN ('MirrorLobbyRequest', 'MirrorLobbyReply')", false); } + @Test public void testFloatComparisons() throws Exception { MockMessage message = createMessage(); @@ -444,12 +461,14 @@ public class SelectorTest extends TestCase assertSelector(message, "4E-10 < 5E-10", true); } + @Test public void testStringQuoteParsing() throws Exception { MockMessage message = createMessage(); assertSelector(message, "quote = '''In God We Trust'''", true); } + @Test public void testLikeComparisons() throws Exception { MockMessage message = createMessage(); @@ -472,6 +491,7 @@ public class SelectorTest extends TestCase assertSelector(message, "punctuation LIKE '!#$&()*+,-./:;<=>?@[\\]^`{|}~'", true); } + @Test public void testInvalidSelector() throws Exception { MockMessage message = createMessage(); @@ -511,7 +531,7 @@ public class SelectorTest extends TestCase try { SelectorParser.parse(text); - fail("Created a valid selector"); + Assert.fail("Created a valid selector"); } catch (FilterException e) { @@ -521,9 +541,9 @@ public class SelectorTest extends TestCase protected void assertSelector(MockMessage message, String text, boolean expected) throws FilterException { BooleanExpression selector = SelectorParser.parse(text); - assertTrue("Created a valid selector", selector != null); + Assert.assertTrue("Created a valid selector", selector != null); boolean value = selector.matches(message); - assertEquals("Selector for: " + text, expected, value); + Assert.assertEquals("Selector for: " + text, expected, value); } protected MockMessage createMessage(String subject) http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-server/pom.xml ---------------------------------------------------------------------- diff --git a/hornetq-server/pom.xml b/hornetq-server/pom.xml index 94adc63..7695bde 100644 --- a/hornetq-server/pom.xml +++ b/hornetq-server/pom.xml @@ -35,11 +35,6 @@ test - org.jboss.logmanager - jboss-logmanager - test - - org.hornetq hornetq-commons ${project.version} http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-server/src/main/java/org/hornetq/core/config/BridgeConfiguration.java ---------------------------------------------------------------------- diff --git a/hornetq-server/src/main/java/org/hornetq/core/config/BridgeConfiguration.java b/hornetq-server/src/main/java/org/hornetq/core/config/BridgeConfiguration.java index 6d56039..70a18b3 100644 --- a/hornetq-server/src/main/java/org/hornetq/core/config/BridgeConfiguration.java +++ b/hornetq-server/src/main/java/org/hornetq/core/config/BridgeConfiguration.java @@ -15,6 +15,7 @@ package org.hornetq.core.config; import java.io.Serializable; import java.util.List; +import org.hornetq.api.config.HornetQDefaultConfiguration; import org.hornetq.api.core.client.HornetQClient; /** @@ -25,17 +26,17 @@ public final class BridgeConfiguration implements Serializable { private static final long serialVersionUID = -1057244274380572226L; - private String name; + private String name = null; - private String queueName; + private String queueName = null; - private String forwardingAddress; + private String forwardingAddress = null; - private String filterString; + private String filterString = null; - private List staticConnectors; + private List staticConnectors = null; - private String discoveryGroupName; + private String discoveryGroupName = null; private boolean ha = false; @@ -43,23 +44,23 @@ public final class BridgeConfiguration implements Serializable private long retryInterval = HornetQClient.DEFAULT_RETRY_INTERVAL; - private double retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL; + private double retryIntervalMultiplier = HornetQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER; - private int initialConnectAttempts = -1; + private int initialConnectAttempts = HornetQDefaultConfiguration.getDefaultBridgeInitialConnectAttempts(); - private int reconnectAttempts = -1; + private int reconnectAttempts = HornetQDefaultConfiguration.getDefaultBridgeReconnectAttempts(); - private int reconnectAttemptsOnSameNode = 10; + private int reconnectAttemptsOnSameNode = HornetQDefaultConfiguration.getDefaultBridgeConnectSameNode(); - private boolean useDuplicateDetection = true; + private boolean useDuplicateDetection = HornetQDefaultConfiguration.isDefaultBridgeDuplicateDetection(); private int confirmationWindowSize = HornetQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE; private long clientFailureCheckPeriod = HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD; - private String user; + private String user = HornetQDefaultConfiguration.getDefaultClusterUser(); - private String password; + private String password = HornetQDefaultConfiguration.getDefaultClusterPassword(); private long connectionTTL = HornetQClient.DEFAULT_CONNECTION_TTL; @@ -72,101 +73,10 @@ public final class BridgeConfiguration implements Serializable private long callTimeout = HornetQClient.DEFAULT_CALL_TIMEOUT; - /** - * A default constructor for embedded users or testcases to setup defaults - */ public BridgeConfiguration() { } - public BridgeConfiguration(final String name, - final String queueName, - final String forwardingAddress, - final String filterString, - final String transformerClassName, - final int minLargeMessageSize, - final long clientFailureCheckPeriod, - final long connectionTTL, - final long retryInterval, - final long maxRetryInterval, - final double retryIntervalMultiplier, - final int initialConnectAttempts, - final int reconnectAttempts, - final int reconnectAttemptsOnSameNode, - final boolean useDuplicateDetection, - final int confirmationWindowSize, - final List staticConnectors, - final boolean ha, - final String user, - final String password) - { - this.name = name; - this.queueName = queueName; - this.forwardingAddress = forwardingAddress; - this.minLargeMessageSize = minLargeMessageSize; - this.filterString = filterString; - this.transformerClassName = transformerClassName; - this.retryInterval = retryInterval; - this.retryIntervalMultiplier = retryIntervalMultiplier; - this.initialConnectAttempts = initialConnectAttempts; - this.reconnectAttempts = reconnectAttempts; - this.reconnectAttemptsOnSameNode = reconnectAttemptsOnSameNode; - this.useDuplicateDetection = useDuplicateDetection; - this.confirmationWindowSize = confirmationWindowSize; - this.clientFailureCheckPeriod = clientFailureCheckPeriod; - this.staticConnectors = staticConnectors; - this.user = user; - this.password = password; - this.connectionTTL = connectionTTL; - this.maxRetryInterval = maxRetryInterval; - this.ha = ha; - discoveryGroupName = null; - } - - public BridgeConfiguration(final String name, - final String queueName, - final String forwardingAddress, - final String filterString, - final String transformerClassName, - final int minLargeMessageSize, - final long clientFailureCheckPeriod, - final long connectionTTL, - final long retryInterval, - final long maxRetryInterval, - final double retryIntervalMultiplier, - final int initialConnectAttempts, - final int reconnectAttempts, - final int reconnectAttemptsOnSameNode, - final boolean useDuplicateDetection, - final int confirmationWindowSize, - final String discoveryGroupName, - final boolean ha, - final String user, - final String password) - { - this.name = name; - this.queueName = queueName; - this.forwardingAddress = forwardingAddress; - this.filterString = filterString; - this.transformerClassName = transformerClassName; - this.minLargeMessageSize = minLargeMessageSize; - this.retryInterval = retryInterval; - this.retryIntervalMultiplier = retryIntervalMultiplier; - this.initialConnectAttempts = initialConnectAttempts; - this.reconnectAttempts = reconnectAttempts; - this.reconnectAttemptsOnSameNode = reconnectAttemptsOnSameNode; - this.useDuplicateDetection = useDuplicateDetection; - this.confirmationWindowSize = confirmationWindowSize; - this.clientFailureCheckPeriod = clientFailureCheckPeriod; - this.staticConnectors = null; - this.discoveryGroupName = discoveryGroupName; - this.ha = ha; - this.user = user; - this.password = password; - this.connectionTTL = connectionTTL; - this.maxRetryInterval = maxRetryInterval; - } - public String getName() { return name; @@ -175,9 +85,10 @@ public final class BridgeConfiguration implements Serializable /** * @param name the name to set */ - public void setName(final String name) + public BridgeConfiguration setName(final String name) { this.name = name; + return this; } public String getQueueName() @@ -188,9 +99,10 @@ public final class BridgeConfiguration implements Serializable /** * @param queueName the queueName to set */ - public void setQueueName(final String queueName) + public BridgeConfiguration setQueueName(final String queueName) { this.queueName = queueName; + return this; } /** @@ -201,9 +113,10 @@ public final class BridgeConfiguration implements Serializable return connectionTTL; } - public void setConnectionTTL(long connectionTTL) + public BridgeConfiguration setConnectionTTL(long connectionTTL) { this.connectionTTL = connectionTTL; + return this; } /** @@ -214,9 +127,10 @@ public final class BridgeConfiguration implements Serializable return maxRetryInterval; } - public void setMaxRetryInterval(long maxRetryInterval) + public BridgeConfiguration setMaxRetryInterval(long maxRetryInterval) { this.maxRetryInterval = maxRetryInterval; + return this; } public String getForwardingAddress() @@ -227,9 +141,10 @@ public final class BridgeConfiguration implements Serializable /** * @param forwardingAddress the forwardingAddress to set */ - public void setForwardingAddress(final String forwardingAddress) + public BridgeConfiguration setForwardingAddress(final String forwardingAddress) { this.forwardingAddress = forwardingAddress; + return this; } public String getFilterString() @@ -240,9 +155,10 @@ public final class BridgeConfiguration implements Serializable /** * @param filterString the filterString to set */ - public void setFilterString(final String filterString) + public BridgeConfiguration setFilterString(final String filterString) { this.filterString = filterString; + return this; } public String getTransformerClassName() @@ -253,9 +169,10 @@ public final class BridgeConfiguration implements Serializable /** * @param transformerClassName the transformerClassName to set */ - public void setTransformerClassName(final String transformerClassName) + public BridgeConfiguration setTransformerClassName(final String transformerClassName) { this.transformerClassName = transformerClassName; + return this; } public List getStaticConnectors() @@ -266,9 +183,10 @@ public final class BridgeConfiguration implements Serializable /** * @param staticConnectors the staticConnectors to set */ - public void setStaticConnectors(final List staticConnectors) + public BridgeConfiguration setStaticConnectors(final List staticConnectors) { this.staticConnectors = staticConnectors; + return this; } public String getDiscoveryGroupName() @@ -279,9 +197,10 @@ public final class BridgeConfiguration implements Serializable /** * @param discoveryGroupName the discoveryGroupName to set */ - public void setDiscoveryGroupName(final String discoveryGroupName) + public BridgeConfiguration setDiscoveryGroupName(final String discoveryGroupName) { this.discoveryGroupName = discoveryGroupName; + return this; } public boolean isHA() @@ -293,9 +212,10 @@ public final class BridgeConfiguration implements Serializable * * @param ha is the bridge supporting HA? */ - public void setHA(final boolean ha) + public BridgeConfiguration setHA(final boolean ha) { this.ha = ha; + return this; } public long getRetryInterval() @@ -306,9 +226,10 @@ public final class BridgeConfiguration implements Serializable /** * @param retryInterval the retryInterval to set */ - public void setRetryInterval(final long retryInterval) + public BridgeConfiguration setRetryInterval(final long retryInterval) { this.retryInterval = retryInterval; + return this; } public double getRetryIntervalMultiplier() @@ -319,9 +240,10 @@ public final class BridgeConfiguration implements Serializable /** * @param retryIntervalMultiplier the retryIntervalMultiplier to set */ - public void setRetryIntervalMultiplier(final double retryIntervalMultiplier) + public BridgeConfiguration setRetryIntervalMultiplier(final double retryIntervalMultiplier) { this.retryIntervalMultiplier = retryIntervalMultiplier; + return this; } public int getInitialConnectAttempts() @@ -332,9 +254,10 @@ public final class BridgeConfiguration implements Serializable /** * @param initialConnectAttempts the initialConnectAttempts to set */ - public void setInitialConnectAttempts(final int initialConnectAttempts) + public BridgeConfiguration setInitialConnectAttempts(final int initialConnectAttempts) { this.initialConnectAttempts = initialConnectAttempts; + return this; } public int getReconnectAttempts() @@ -345,9 +268,10 @@ public final class BridgeConfiguration implements Serializable /** * @param reconnectAttempts the reconnectAttempts to set */ - public void setReconnectAttempts(final int reconnectAttempts) + public BridgeConfiguration setReconnectAttempts(final int reconnectAttempts) { this.reconnectAttempts = reconnectAttempts; + return this; } public boolean isUseDuplicateDetection() @@ -358,9 +282,10 @@ public final class BridgeConfiguration implements Serializable /** * @param useDuplicateDetection the useDuplicateDetection to set */ - public void setUseDuplicateDetection(final boolean useDuplicateDetection) + public BridgeConfiguration setUseDuplicateDetection(final boolean useDuplicateDetection) { this.useDuplicateDetection = useDuplicateDetection; + return this; } public int getConfirmationWindowSize() @@ -371,9 +296,10 @@ public final class BridgeConfiguration implements Serializable /** * @param confirmationWindowSize the confirmationWindowSize to set */ - public void setConfirmationWindowSize(final int confirmationWindowSize) + public BridgeConfiguration setConfirmationWindowSize(final int confirmationWindowSize) { this.confirmationWindowSize = confirmationWindowSize; + return this; } public long getClientFailureCheckPeriod() @@ -381,9 +307,10 @@ public final class BridgeConfiguration implements Serializable return clientFailureCheckPeriod; } - public void setClientFailureCheckPeriod(long clientFailureCheckPeriod) + public BridgeConfiguration setClientFailureCheckPeriod(long clientFailureCheckPeriod) { this.clientFailureCheckPeriod = clientFailureCheckPeriod; + return this; } /** @@ -394,9 +321,10 @@ public final class BridgeConfiguration implements Serializable return minLargeMessageSize; } - public void setMinLargeMessageSize(int minLargeMessageSize) + public BridgeConfiguration setMinLargeMessageSize(int minLargeMessageSize) { this.minLargeMessageSize = minLargeMessageSize; + return this; } public String getUser() @@ -404,9 +332,10 @@ public final class BridgeConfiguration implements Serializable return user; } - public void setUser(String user) + public BridgeConfiguration setUser(String user) { this.user = user; + return this; } public String getPassword() @@ -414,9 +343,10 @@ public final class BridgeConfiguration implements Serializable return password; } - public void setPassword(String password) + public BridgeConfiguration setPassword(String password) { this.password = password; + return this; } /** @@ -432,9 +362,10 @@ public final class BridgeConfiguration implements Serializable return reconnectAttemptsOnSameNode; } - public void setReconnectAttemptsOnSameNode(int reconnectAttemptsOnSameNode) + public BridgeConfiguration setReconnectAttemptsOnSameNode(int reconnectAttemptsOnSameNode) { this.reconnectAttemptsOnSameNode = reconnectAttemptsOnSameNode; + return this; } /** @@ -443,9 +374,10 @@ public final class BridgeConfiguration implements Serializable * The bridge shouldn't be sending blocking anyways * @param callTimeout the callTimeout to set */ - public void setCallTimeout(long callTimeout) + public BridgeConfiguration setCallTimeout(long callTimeout) { this.callTimeout = callTimeout; + return this; } @Override http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-server/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java ---------------------------------------------------------------------- diff --git a/hornetq-server/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java b/hornetq-server/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java index 8cdeab8..e3ea8ee 100644 --- a/hornetq-server/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java +++ b/hornetq-server/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java @@ -18,7 +18,6 @@ import java.util.List; import org.hornetq.api.config.HornetQDefaultConfiguration; import org.hornetq.api.core.client.HornetQClient; -import org.hornetq.core.server.HornetQMessageBundle; /** * A ClusterConnectionConfiguration @@ -29,231 +28,74 @@ public final class ClusterConnectionConfiguration implements Serializable { private static final long serialVersionUID = 8948303813427795935L; - private final String name; + private String name; - private final String address; + private String address; - private final String connectorName; + private String connectorName; - private long clientFailureCheckPeriod; + private long clientFailureCheckPeriod = HornetQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(); - private long connectionTTL; + private long connectionTTL = HornetQDefaultConfiguration.getDefaultClusterConnectionTtl(); - private long retryInterval; + private long retryInterval = HornetQDefaultConfiguration.getDefaultClusterRetryInterval(); - private double retryIntervalMultiplier; + private double retryIntervalMultiplier = HornetQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(); - private long maxRetryInterval; + private long maxRetryInterval = HornetQDefaultConfiguration.getDefaultClusterMaxRetryInterval(); - private int initialConnectAttempts; + private int initialConnectAttempts = HornetQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(); - private int reconnectAttempts; + private int reconnectAttempts = HornetQDefaultConfiguration.getDefaultClusterReconnectAttempts(); - private long callTimeout; + private long callTimeout = HornetQDefaultConfiguration.getDefaultClusterCallTimeout(); - private long callFailoverTimeout; + private long callFailoverTimeout = HornetQDefaultConfiguration.getDefaultClusterCallFailoverTimeout(); - private boolean duplicateDetection; + private boolean duplicateDetection = HornetQDefaultConfiguration.isDefaultClusterDuplicateDetection(); - private boolean forwardWhenNoConsumers; + private boolean forwardWhenNoConsumers = HornetQDefaultConfiguration.isDefaultClusterForwardWhenNoConsumers(); - private final List staticConnectors; + private List staticConnectors = Collections.emptyList(); - private final String discoveryGroupName; + private String discoveryGroupName = null; - private final int maxHops; + private int maxHops = HornetQDefaultConfiguration.getDefaultClusterMaxHops(); - private final int confirmationWindowSize; + private int confirmationWindowSize = HornetQDefaultConfiguration.getDefaultClusterConfirmationWindowSize(); - private final boolean allowDirectConnectionsOnly; + private boolean allowDirectConnectionsOnly = false; - private int minLargeMessageSize; + private int minLargeMessageSize = HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE; - private final long clusterNotificationInterval; + private long clusterNotificationInterval = HornetQDefaultConfiguration.getDefaultClusterNotificationInterval(); - private final int clusterNotificationAttempts; + private int clusterNotificationAttempts = HornetQDefaultConfiguration.getDefaultClusterNotificationAttempts(); - public ClusterConnectionConfiguration(final String name, - final String address, - final String connectorName, - final long retryInterval, - final boolean duplicateDetection, - final boolean forwardWhenNoConsumers, - final int maxHops, - final int confirmationWindowSize, - final List staticConnectors, - final boolean allowDirectConnectionsOnly) + public ClusterConnectionConfiguration() { - this(name, - address, - connectorName, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(), - HornetQDefaultConfiguration.getDefaultClusterConnectionTtl(), - retryInterval, - HornetQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), - HornetQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), - HornetQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), - HornetQDefaultConfiguration.getDefaultClusterReconnectAttempts(), - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - duplicateDetection, - forwardWhenNoConsumers, - maxHops, - confirmationWindowSize, - staticConnectors, - allowDirectConnectionsOnly, - HornetQDefaultConfiguration.getDefaultClusterNotificationInterval(), - HornetQDefaultConfiguration.getDefaultClusterNotificationAttempts(), - null); } - - public ClusterConnectionConfiguration(final String name, - final String address, - final String connectorName, - final int minLargeMessageSize, - final long clientFailureCheckPeriod, - final long connectionTTL, - final long retryInterval, - final double retryIntervalMultiplier, - final long maxRetryInterval, - final int initialConnectAttempts, - final int reconnectAttempts, - final long callTimeout, - final long callFailoverTimeout, - final boolean duplicateDetection, - final boolean forwardWhenNoConsumers, - final int maxHops, - final int confirmationWindowSize, - final List staticConnectors, - final boolean allowDirectConnectionsOnly, - final long clusterNotificationInterval, - final int clusterNotificationAttempts, - final String scaleDownConnector) + public String getName() { - this.name = name; - this.address = address; - this.connectorName = connectorName; - this.clientFailureCheckPeriod = clientFailureCheckPeriod; - this.connectionTTL = connectionTTL; - if (retryInterval <= 0) - throw HornetQMessageBundle.BUNDLE.invalidRetryInterval(retryInterval); - this.retryInterval = retryInterval; - this.retryIntervalMultiplier = retryIntervalMultiplier; - this.maxRetryInterval = maxRetryInterval; - this.initialConnectAttempts = initialConnectAttempts; - this.reconnectAttempts = reconnectAttempts; - if (staticConnectors != null) - { - this.staticConnectors = staticConnectors; - } - else - { - this.staticConnectors = Collections.emptyList(); - } - this.duplicateDetection = duplicateDetection; - this.callTimeout = callTimeout; - this.callFailoverTimeout = callFailoverTimeout; - this.forwardWhenNoConsumers = forwardWhenNoConsumers; - discoveryGroupName = null; - this.maxHops = maxHops; - this.confirmationWindowSize = confirmationWindowSize; - this.allowDirectConnectionsOnly = allowDirectConnectionsOnly; - this.minLargeMessageSize = minLargeMessageSize; - this.clusterNotificationInterval = clusterNotificationInterval; - this.clusterNotificationAttempts = clusterNotificationAttempts; + return name; } - - public ClusterConnectionConfiguration(final String name, - final String address, - final String connectorName, - final long retryInterval, - final boolean duplicateDetection, - final boolean forwardWhenNoConsumers, - final int maxHops, - final int confirmationWindowSize, - final String discoveryGroupName) - { - this(name, - address, - connectorName, - HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, - HornetQDefaultConfiguration.getDefaultClusterFailureCheckPeriod(), - HornetQDefaultConfiguration.getDefaultClusterConnectionTtl(), - retryInterval, - HornetQDefaultConfiguration.getDefaultClusterRetryIntervalMultiplier(), - HornetQDefaultConfiguration.getDefaultClusterMaxRetryInterval(), - HornetQDefaultConfiguration.getDefaultClusterInitialConnectAttempts(), - HornetQDefaultConfiguration.getDefaultClusterReconnectAttempts(), - HornetQClient.DEFAULT_CALL_TIMEOUT, - HornetQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, - duplicateDetection, - forwardWhenNoConsumers, - maxHops, - confirmationWindowSize, - discoveryGroupName, - HornetQDefaultConfiguration.getDefaultClusterNotificationInterval(), - HornetQDefaultConfiguration.getDefaultClusterNotificationAttempts(), - null); - } - - - public ClusterConnectionConfiguration(final String name, - final String address, - final String connectorName, - final int minLargeMessageSize, - final long clientFailureCheckPeriod, - final long connectionTTL, - final long retryInterval, - final double retryIntervalMultiplier, - final long maxRetryInterval, - final int initialConnectAttempts, - final int reconnectAttempts, - final long callTimeout, - final long callFailoverTimeout, - final boolean duplicateDetection, - final boolean forwardWhenNoConsumers, - final int maxHops, - final int confirmationWindowSize, - final String discoveryGroupName, - final long clusterNotificationInterval, - final int clusterNotificationAttempts, - final String scaleDownConnector) + public ClusterConnectionConfiguration setName(String name) { this.name = name; - this.address = address; - this.connectorName = connectorName; - this.clientFailureCheckPeriod = clientFailureCheckPeriod; - this.connectionTTL = connectionTTL; - this.retryInterval = retryInterval; - this.retryIntervalMultiplier = retryIntervalMultiplier; - this.maxRetryInterval = maxRetryInterval; - this.initialConnectAttempts = initialConnectAttempts; - this.reconnectAttempts = reconnectAttempts; - this.callTimeout = callTimeout; - this.callFailoverTimeout = callFailoverTimeout; - this.duplicateDetection = duplicateDetection; - this.forwardWhenNoConsumers = forwardWhenNoConsumers; - this.discoveryGroupName = discoveryGroupName; - this.clusterNotificationInterval = clusterNotificationInterval; - this.clusterNotificationAttempts = clusterNotificationAttempts; - this.staticConnectors = Collections.emptyList(); - this.maxHops = maxHops; - this.confirmationWindowSize = confirmationWindowSize; - this.minLargeMessageSize = minLargeMessageSize; - allowDirectConnectionsOnly = false; + return this; } - public String getName() + public String getAddress() { - return name; + return address; } - public String getAddress() + public ClusterConnectionConfiguration setAddress(String address) { - return address; + this.address = address; + return this; } /** @@ -319,6 +161,12 @@ public final class ClusterConnectionConfiguration implements Serializable return connectorName; } + public ClusterConnectionConfiguration setConnectorName(String connectorName) + { + this.connectorName = connectorName; + return this; + } + public boolean isDuplicateDetection() { return duplicateDetection; @@ -334,21 +182,45 @@ public final class ClusterConnectionConfiguration implements Serializable return maxHops; } + public ClusterConnectionConfiguration setMaxHops(int maxHops) + { + this.maxHops = maxHops; + return this; + } + public int getConfirmationWindowSize() { return confirmationWindowSize; } + public ClusterConnectionConfiguration setConfirmationWindowSize(int confirmationWindowSize) + { + this.confirmationWindowSize = confirmationWindowSize; + return this; + } + public List getStaticConnectors() { return staticConnectors; } + public ClusterConnectionConfiguration setStaticConnectors(List staticConnectors) + { + this.staticConnectors = staticConnectors; + return this; + } + public String getDiscoveryGroupName() { return discoveryGroupName; } + public ClusterConnectionConfiguration setDiscoveryGroupName(String discoveryGroupName) + { + this.discoveryGroupName = discoveryGroupName; + return this; + } + public long getRetryInterval() { return retryInterval; @@ -359,6 +231,12 @@ public final class ClusterConnectionConfiguration implements Serializable return allowDirectConnectionsOnly; } + public ClusterConnectionConfiguration setAllowDirectConnectionsOnly(boolean allowDirectConnectionsOnly) + { + this.allowDirectConnectionsOnly = allowDirectConnectionsOnly; + return this; + } + /** * @return the minLargeMessageSize @@ -371,97 +249,109 @@ public final class ClusterConnectionConfiguration implements Serializable /** * @param minLargeMessageSize the minLargeMessageSize to set */ - public void setMinLargeMessageSize(final int minLargeMessageSize) + public ClusterConnectionConfiguration setMinLargeMessageSize(final int minLargeMessageSize) { this.minLargeMessageSize = minLargeMessageSize; + return this; } /** * @param clientFailureCheckPeriod the clientFailureCheckPeriod to set */ - public void setClientFailureCheckPeriod(long clientFailureCheckPeriod) + public ClusterConnectionConfiguration setClientFailureCheckPeriod(long clientFailureCheckPeriod) { this.clientFailureCheckPeriod = clientFailureCheckPeriod; + return this; } /** * @param connectionTTL the connectionTTL to set */ - public void setConnectionTTL(long connectionTTL) + public ClusterConnectionConfiguration setConnectionTTL(long connectionTTL) { this.connectionTTL = connectionTTL; + return this; } /** * @param retryInterval the retryInterval to set */ - public void setRetryInterval(long retryInterval) + public ClusterConnectionConfiguration setRetryInterval(long retryInterval) { this.retryInterval = retryInterval; + return this; } /** * @param retryIntervalMultiplier the retryIntervalMultiplier to set */ - public void setRetryIntervalMultiplier(double retryIntervalMultiplier) + public ClusterConnectionConfiguration setRetryIntervalMultiplier(double retryIntervalMultiplier) { this.retryIntervalMultiplier = retryIntervalMultiplier; + return this; } /** * @param maxRetryInterval the maxRetryInterval to set */ - public void setMaxRetryInterval(long maxRetryInterval) + public ClusterConnectionConfiguration setMaxRetryInterval(long maxRetryInterval) { this.maxRetryInterval = maxRetryInterval; + return this; } /** * @param initialConnectAttempts the reconnectAttempts to set */ - public void setInitialConnectAttempts(int initialConnectAttempts) + public ClusterConnectionConfiguration setInitialConnectAttempts(int initialConnectAttempts) { this.initialConnectAttempts = initialConnectAttempts; + return this; } /** * @param reconnectAttempts the reconnectAttempts to set */ - public void setReconnectAttempts(int reconnectAttempts) + public ClusterConnectionConfiguration setReconnectAttempts(int reconnectAttempts) { this.reconnectAttempts = reconnectAttempts; + return this; } /** * @param callTimeout the callTimeout to set */ - public void setCallTimeout(long callTimeout) + public ClusterConnectionConfiguration setCallTimeout(long callTimeout) { this.callTimeout = callTimeout; + return this; } /** * @param callFailoverTimeout the callTimeout to set */ - public void setCallFailoverTimeout(long callFailoverTimeout) + public ClusterConnectionConfiguration setCallFailoverTimeout(long callFailoverTimeout) { this.callFailoverTimeout = callFailoverTimeout; + return this; } /** * @param duplicateDetection the duplicateDetection to set */ - public void setDuplicateDetection(boolean duplicateDetection) + public ClusterConnectionConfiguration setDuplicateDetection(boolean duplicateDetection) { this.duplicateDetection = duplicateDetection; + return this; } /** * @param forwardWhenNoConsumers the forwardWhenNoConsumers to set */ - public void setForwardWhenNoConsumers(boolean forwardWhenNoConsumers) + public ClusterConnectionConfiguration setForwardWhenNoConsumers(boolean forwardWhenNoConsumers) { this.forwardWhenNoConsumers = forwardWhenNoConsumers; + return this; } /* @@ -472,11 +362,23 @@ public final class ClusterConnectionConfiguration implements Serializable return clusterNotificationInterval; } + public ClusterConnectionConfiguration setClusterNotificationInterval(long clusterNotificationInterval) + { + this.clusterNotificationInterval = clusterNotificationInterval; + return this; + } + public int getClusterNotificationAttempts() { return clusterNotificationAttempts; } + public ClusterConnectionConfiguration setClusterNotificationAttempts(int clusterNotificationAttempts) + { + this.clusterNotificationAttempts = clusterNotificationAttempts; + return this; + } + @Override public int hashCode() { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/177e6820/hornetq-server/src/main/java/org/hornetq/core/config/Configuration.java ---------------------------------------------------------------------- diff --git a/hornetq-server/src/main/java/org/hornetq/core/config/Configuration.java b/hornetq-server/src/main/java/org/hornetq/core/config/Configuration.java index ebf06f2..084a7e2 100644 --- a/hornetq-server/src/main/java/org/hornetq/core/config/Configuration.java +++ b/hornetq-server/src/main/java/org/hornetq/core/config/Configuration.java @@ -23,7 +23,6 @@ import org.hornetq.api.core.SimpleString; import org.hornetq.api.core.TransportConfiguration; import org.hornetq.core.security.Role; import org.hornetq.core.server.JournalType; -import org.hornetq.core.server.cluster.ha.HAPolicy; import org.hornetq.core.server.group.impl.GroupingHandlerConfiguration; import org.hornetq.core.settings.impl.AddressSettings; @@ -42,7 +41,7 @@ public interface Configuration extends Serializable /** * To be used on dependency management on the application server */ - void setName(String name); + Configuration setName(String name); /** * returns the name used to group of live/backup servers @@ -59,10 +58,10 @@ public interface Configuration extends Serializable * * @param nodeGroupName the node group name * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setBackupGroupName(String)} + * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated - void setBackupGroupName(String nodeGroupName); + Configuration setBackupGroupName(String nodeGroupName); /** * Returns whether this server is clustered.
@@ -76,20 +75,10 @@ public interface Configuration extends Serializable * * @return {@code true} if the backup will stop when the live server restarts * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#isAllowAutoFailBack()} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated - boolean isAllowAutoFailBack(); - - /** - * whether a backup will automatically stop when a live server is restarting (i.e. failing back). - * - * @param allowAutoFailBack true if allowed - * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setAllowAutoFailBack(boolean)} - */ - @Deprecated - void setAllowAutoFailBack(boolean allowAutoFailBack); + boolean isAllowFailBack(); /** * Returns whether delivery count is persisted before messages are delivered to the consumers.
@@ -101,7 +90,7 @@ public interface Configuration extends Serializable /** * Sets whether delivery count is persisted before messages are delivered to consumers. */ - void setPersistDeliveryCountBeforeDelivery(boolean persistDeliveryCountBeforeDelivery); + Configuration setPersistDeliveryCountBeforeDelivery(boolean persistDeliveryCountBeforeDelivery); /** * Returns {@code true} if this server is a backup, {@code false} if it is a live server.
@@ -116,10 +105,10 @@ public interface Configuration extends Serializable /** * Formerly set whether this server is a backup or not. * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setPolicyType(org.hornetq.core.server.cluster.ha.HAPolicy.POLICY_TYPE)} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated - void setBackup(boolean backup); + Configuration setBackup(boolean backup); /** * Returns whether this server shares its data store with a corresponding live or backup server.
@@ -133,10 +122,10 @@ public interface Configuration extends Serializable /** * Formerly set whether this server shares its data store with a backup or live server. * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setPolicyType(org.hornetq.core.server.cluster.ha.HAPolicy.POLICY_TYPE)} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated - void setSharedStore(boolean sharedStore); + Configuration setSharedStore(boolean sharedStore); /** * Returns whether this server will use files to configure and deploy its resources.
@@ -147,7 +136,7 @@ public interface Configuration extends Serializable /** * Sets whether this server will use files to configure and deploy its resources. */ - void setFileDeploymentEnabled(boolean enable); + Configuration setFileDeploymentEnabled(boolean enable); /** * Returns whether this server is using persistence and store data.
@@ -158,7 +147,7 @@ public interface Configuration extends Serializable /** * Sets whether this server is using persistence and store data. */ - void setPersistenceEnabled(boolean enable); + Configuration setPersistenceEnabled(boolean enable); /** * Returns the period (in milliseconds) to scan configuration files used by deployment.
@@ -169,7 +158,7 @@ public interface Configuration extends Serializable /** * Sets the period to scan configuration files used by deployment. */ - void setFileDeployerScanPeriod(long period); + Configuration setFileDeployerScanPeriod(long period); /** * Returns the maximum number of threads in the thread pool of this server.
@@ -180,7 +169,7 @@ public interface Configuration extends Serializable /** * Sets the maximum number of threads in the thread pool of this server. */ - void setThreadPoolMaxSize(int maxSize); + Configuration setThreadPoolMaxSize(int maxSize); /** * Returns the maximum number of threads in the scheduled thread pool of this server.
@@ -191,7 +180,7 @@ public interface Configuration extends Serializable /** * Sets the maximum number of threads in the scheduled thread pool of this server. */ - void setScheduledThreadPoolMaxSize(int maxSize); + Configuration setScheduledThreadPoolMaxSize(int maxSize); /** * Returns the interval time (in milliseconds) to invalidate security credentials.
@@ -202,7 +191,7 @@ public interface Configuration extends Serializable /** * Sets the interval time (in milliseconds) to invalidate security credentials. */ - void setSecurityInvalidationInterval(long interval); + Configuration setSecurityInvalidationInterval(long interval); /** * Returns whether security is enabled for this server.
@@ -213,7 +202,7 @@ public interface Configuration extends Serializable /** * Sets whether security is enabled for this server. */ - void setSecurityEnabled(boolean enabled); + Configuration setSecurityEnabled(boolean enabled); /** * Returns whether this server is manageable using JMX or not.
@@ -222,9 +211,10 @@ public interface Configuration extends Serializable boolean isJMXManagementEnabled(); /** - * Sets whether this server is manageable using JMX or not. + * Sets whether this server is manageable using JMX or not.
+ * Default value is {@value org.hornetq.api.config.HornetQDefaultConfiguration#DEFAULT_JMX_MANAGEMENT_ENABLED}. */ - void setJMXManagementEnabled(boolean enabled); + Configuration setJMXManagementEnabled(boolean enabled); /** * Returns the domain used by JMX MBeans (provided JMX management is enabled).
@@ -238,7 +228,7 @@ public interface Configuration extends Serializable * Changing this JMX domain is required if multiple HornetQ servers are run inside * the same JVM and all servers are using the same MBeanServer. */ - void setJMXDomain(String domain); + Configuration setJMXDomain(String domain); /** * Returns the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to @@ -276,7 +266,7 @@ public interface Configuration extends Serializable * {@link #setOutgoingInterceptorClassNames(List)} */ @Deprecated - void setInterceptorClassNames(List interceptors); + Configuration setInterceptorClassNames(List interceptors); /** * Sets the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to @@ -284,7 +274,7 @@ public interface Configuration extends Serializable *
* Classes must implement {@link org.hornetq.api.core.Interceptor}. */ - void setIncomingInterceptorClassNames(List interceptors); + Configuration setIncomingInterceptorClassNames(List interceptors); /** * Sets the list of interceptors classes used by this server for outgoing messages (i.e. those being delivered to @@ -292,7 +282,7 @@ public interface Configuration extends Serializable *
* Classes must implement {@link org.hornetq.api.core.Interceptor}. */ - void setOutgoingInterceptorClassNames(List interceptors); + Configuration setOutgoingInterceptorClassNames(List interceptors); /** * Returns the connection time to live.
@@ -304,7 +294,7 @@ public interface Configuration extends Serializable /** * Sets the connection time to live. */ - void setConnectionTTLOverride(long ttl); + Configuration setConnectionTTLOverride(long ttl); /** * Returns whether code coming from connection is executed asynchronously or not.
@@ -316,7 +306,7 @@ public interface Configuration extends Serializable /** * Sets whether code coming from connection is executed asynchronously or not. */ - void setEnabledAsyncConnectionExecution(boolean enabled); + Configuration setEnabledAsyncConnectionExecution(boolean enabled); /** * Returns the acceptors configured for this server. @@ -326,7 +316,11 @@ public interface Configuration extends Serializable /** * Sets the acceptors configured for this server. */ - void setAcceptorConfigurations(Set infos); + Configuration setAcceptorConfigurations(Set infos); + + Configuration addAcceptorConfiguration(final TransportConfiguration infos); + + Configuration clearAcceptorConfigurations(); /** * Returns the connectors configured for this server. @@ -336,7 +330,9 @@ public interface Configuration extends Serializable /** * Sets the connectors configured for this server. */ - void setConnectorConfigurations(Map infos); + Configuration setConnectorConfigurations(Map infos); + + Configuration addConnectorConfiguration(final String key, final TransportConfiguration info); /** * Returns the broadcast groups configured for this server. @@ -346,7 +342,9 @@ public interface Configuration extends Serializable /** * Sets the broadcast groups configured for this server. */ - void setBroadcastGroupConfigurations(List configs); + Configuration setBroadcastGroupConfigurations(List configs); + + Configuration addBroadcastGroupConfiguration(final BroadcastGroupConfiguration config); /** * Returns the discovery groups configured for this server. @@ -356,7 +354,9 @@ public interface Configuration extends Serializable /** * Sets the discovery groups configured for this server. */ - void setDiscoveryGroupConfigurations(Map configs); + Configuration setDiscoveryGroupConfigurations(Map configs); + + Configuration addDiscoveryGroupConfiguration(final String key, DiscoveryGroupConfiguration discoveryGroupConfiguration); /** * Returns the grouping handler configured for this server. @@ -366,7 +366,7 @@ public interface Configuration extends Serializable /** * Sets the grouping handler configured for this server. */ - void setGroupingHandlerConfiguration(GroupingHandlerConfiguration groupingHandlerConfiguration); + Configuration setGroupingHandlerConfiguration(GroupingHandlerConfiguration groupingHandlerConfiguration); /** * Returns the bridges configured for this server. @@ -376,7 +376,7 @@ public interface Configuration extends Serializable /** * Sets the bridges configured for this server. */ - void setBridgeConfigurations(final List configs); + Configuration setBridgeConfigurations(final List configs); /** * Returns the diverts configured for this server. @@ -386,7 +386,7 @@ public interface Configuration extends Serializable /** * Sets the diverts configured for this server. */ - void setDivertConfigurations(final List configs); + Configuration setDivertConfigurations(final List configs); /** * Returns the cluster connections configured for this server. @@ -399,7 +399,11 @@ public interface Configuration extends Serializable /** * Sets the cluster connections configured for this server. */ - void setClusterConfigurations(final List configs); + Configuration setClusterConfigurations(final List configs); + + Configuration addClusterConfiguration(final ClusterConnectionConfiguration config); + + Configuration clearClusterConfigurations(); /** * Returns the queues configured for this server. @@ -409,32 +413,34 @@ public interface Configuration extends Serializable /** * Sets the queues configured for this server. */ - void setQueueConfigurations(final List configs); + Configuration setQueueConfigurations(final List configs); + + Configuration addQueueConfiguration(final CoreQueueConfiguration config); /** * Returns the management address of this server.
* Clients can send management messages to this address to manage this server.
- * Default value is {@value org.hornetq.api.config.HornetQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS}. + * Default value is {@link org.hornetq.api.config.HornetQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS}. */ SimpleString getManagementAddress(); /** * Sets the management address of this server. */ - void setManagementAddress(SimpleString address); + Configuration setManagementAddress(SimpleString address); /** * Returns the management notification address of this server.
* Clients can bind queues to this address to receive management notifications emitted by this * server.
- * Default value is {@value org.hornetq.api.config.HornetQDefaultConfiguration#DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS}. + * Default value is {@link org.hornetq.api.config.HornetQDefaultConfiguration#DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS}. */ SimpleString getManagementNotificationAddress(); /** * Sets the management notification address of this server. */ - void setManagementNotificationAddress(SimpleString address); + Configuration setManagementNotificationAddress(SimpleString address); /** * Returns the cluster user for this server.
@@ -445,7 +451,7 @@ public interface Configuration extends Serializable /** * Sets the cluster user for this server. */ - void setClusterUser(String user); + Configuration setClusterUser(String user); /** * Returns the cluster password for this server.
@@ -459,7 +465,7 @@ public interface Configuration extends Serializable * @return true if clients should failover * @see #setFailoverOnServerShutdown(boolean) * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#isFailoverOnServerShutdown()} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated boolean isFailoverOnServerShutdown(); @@ -472,15 +478,15 @@ public interface Configuration extends Serializable * case {@code failoverOnServerShutdown} is ignored, and the server will behave as if it was set * to {@code true}. * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setFailoverOnServerShutdown(boolean)} + * @deprecated you should replace by using the correct {@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated - void setFailoverOnServerShutdown(boolean failoverOnServerShutdown); + Configuration setFailoverOnServerShutdown(boolean failoverOnServerShutdown); /** * Sets the cluster password for this server. */ - void setClusterPassword(String password); + Configuration setClusterPassword(String password); /** * Returns the size of the cache for pre-creating message IDs.
@@ -491,7 +497,7 @@ public interface Configuration extends Serializable /** * Sets the size of the cache for pre-creating message IDs. */ - void setIDCacheSize(int idCacheSize); + Configuration setIDCacheSize(int idCacheSize); /** * Returns whether message ID cache is persisted.
@@ -502,7 +508,7 @@ public interface Configuration extends Serializable /** * Sets whether message ID cache is persisted. */ - void setPersistIDCache(boolean persist); + Configuration setPersistIDCache(boolean persist); // Journal related attributes ------------------------------------------------------------ @@ -515,7 +521,7 @@ public interface Configuration extends Serializable /** * Sets the file system directory used to store bindings. */ - void setBindingsDirectory(String dir); + Configuration setBindingsDirectory(String dir); /** * The max number of concurrent reads allowed on paging. @@ -529,7 +535,7 @@ public interface Configuration extends Serializable *

* Default = 5 */ - void setPageMaxConcurrentIO(int maxIO); + Configuration setPageMaxConcurrentIO(int maxIO); /** * Returns the file system directory used to store journal log.
@@ -540,7 +546,7 @@ public interface Configuration extends Serializable /** * Sets the file system directory used to store journal log. */ - void setJournalDirectory(String dir); + Configuration setJournalDirectory(String dir); /** * Returns the type of journal used by this server (either {@code NIO} or {@code ASYNCIO}). @@ -552,7 +558,7 @@ public interface Configuration extends Serializable /** * Sets the type of journal used by this server (either {@code NIO} or {@code ASYNCIO}). */ - void setJournalType(JournalType type); + Configuration setJournalType(JournalType type); /** * Returns whether the journal is synchronized when receiving transactional data.
@@ -563,7 +569,7 @@ public interface Configuration extends Serializable /** * Sets whether the journal is synchronized when receiving transactional data. */ - void setJournalSyncTransactional(boolean sync); + Configuration setJournalSyncTransactional(boolean sync); /** * Returns whether the journal is synchronized when receiving non-transactional data.
@@ -574,7 +580,7 @@ public interface Configuration extends Serializable /** * Sets whether the journal is synchronized when receiving non-transactional data. */ - void setJournalSyncNonTransactional(boolean sync); + Configuration setJournalSyncNonTransactional(boolean sync); /** * Returns the size (in bytes) of each journal files.
@@ -585,7 +591,7 @@ public interface Configuration extends Serializable /** * Sets the size (in bytes) of each journal files. */ - void setJournalFileSize(int size); + Configuration setJournalFileSize(int size); /** * Returns the minimal number of journal files before compacting.
@@ -596,7 +602,7 @@ public interface Configuration extends Serializable /** * Sets the minimal number of journal files before compacting. */ - void setJournalCompactMinFiles(int minFiles); + Configuration setJournalCompactMinFiles(int minFiles); /** * Returns the percentage of live data before compacting the journal.
@@ -607,7 +613,7 @@ public interface Configuration extends Serializable /** * Sets the percentage of live data before compacting the journal. */ - void setJournalCompactPercentage(int percentage); + Configuration setJournalCompactPercentage(int percentage); /** * Returns the number of journal files to pre-create.
@@ -618,7 +624,7 @@ public interface Configuration extends Serializable /** * Sets the number of journal files to pre-create. */ - void setJournalMinFiles(int files); + Configuration setJournalMinFiles(int files); // AIO and NIO need different values for these params @@ -631,7 +637,7 @@ public interface Configuration extends Serializable /** * Sets the maximum number of write requests that can be in the AIO queue at any given time. */ - void setJournalMaxIO_AIO(int journalMaxIO); + Configuration setJournalMaxIO_AIO(int journalMaxIO); /** * Returns the timeout (in nanoseconds) used to flush buffers in the AIO queue. @@ -643,7 +649,7 @@ public interface Configuration extends Serializable /** * Sets the timeout (in nanoseconds) used to flush buffers in the AIO queue. */ - void setJournalBufferTimeout_AIO(int journalBufferTimeout); + Configuration setJournalBufferTimeout_AIO(int journalBufferTimeout); /** * Returns the buffer size (in bytes) for AIO. @@ -655,7 +661,7 @@ public interface Configuration extends Serializable /** * Sets the buffer size (in bytes) for AIO. */ - void setJournalBufferSize_AIO(int journalBufferSize); + Configuration setJournalBufferSize_AIO(int journalBufferSize); /** * Returns the maximum number of write requests for NIO journal.
@@ -666,7 +672,7 @@ public interface Configuration extends Serializable /** * Sets the maximum number of write requests for NIO journal. */ - void setJournalMaxIO_NIO(int journalMaxIO); + Configuration setJournalMaxIO_NIO(int journalMaxIO); /** * Returns the timeout (in nanoseconds) used to flush buffers in the NIO. @@ -678,7 +684,7 @@ public interface Configuration extends Serializable /** * Sets the timeout (in nanoseconds) used to flush buffers in the NIO. */ - void setJournalBufferTimeout_NIO(int journalBufferTimeout); + Configuration setJournalBufferTimeout_NIO(int journalBufferTimeout); /** * Returns the buffer size (in bytes) for NIO. @@ -690,7 +696,7 @@ public interface Configuration extends Serializable /** * Sets the buffer size (in bytes) for NIO. */ - void setJournalBufferSize_NIO(int journalBufferSize); + Configuration setJournalBufferSize_NIO(int journalBufferSize); /** * Returns whether the bindings directory is created on this server startup.
@@ -701,7 +707,7 @@ public interface Configuration extends Serializable /** * Sets whether the bindings directory is created on this server startup. */ - void setCreateBindingsDir(boolean create); + Configuration setCreateBindingsDir(boolean create); /** * Returns whether the journal directory is created on this server startup.
@@ -712,33 +718,33 @@ public interface Configuration extends Serializable /** * Sets whether the journal directory is created on this server startup. */ - void setCreateJournalDir(boolean create); + Configuration setCreateJournalDir(boolean create); // Undocumented attributes boolean isLogJournalWriteRate(); - void setLogJournalWriteRate(boolean rate); + Configuration setLogJournalWriteRate(boolean rate); int getJournalPerfBlastPages(); - void setJournalPerfBlastPages(int pages); + Configuration setJournalPerfBlastPages(int pages); long getServerDumpInterval(); - void setServerDumpInterval(long interval); + Configuration setServerDumpInterval(long interval); int getMemoryWarningThreshold(); - void setMemoryWarningThreshold(int memoryWarningThreshold); + Configuration setMemoryWarningThreshold(int memoryWarningThreshold); long getMemoryMeasureInterval(); - void setMemoryMeasureInterval(long memoryMeasureInterval); + Configuration setMemoryMeasureInterval(long memoryMeasureInterval); boolean isRunSyncSpeedTest(); - void setRunSyncSpeedTest(boolean run); + Configuration setRunSyncSpeedTest(boolean run); // Paging Properties -------------------------------------------------------------------- @@ -751,7 +757,7 @@ public interface Configuration extends Serializable /** * Sets the file system directory used to store paging files. */ - void setPagingDirectory(String dir); + Configuration setPagingDirectory(String dir); // Large Messages Properties ------------------------------------------------------------ @@ -764,7 +770,7 @@ public interface Configuration extends Serializable /** * Sets the file system directory used to store large messages. */ - void setLargeMessagesDirectory(String directory); + Configuration setLargeMessagesDirectory(String directory); // Other Properties --------------------------------------------------------------------- @@ -777,7 +783,7 @@ public interface Configuration extends Serializable /** * Sets whether wildcard routing is supported by this server. */ - void setWildcardRoutingEnabled(boolean enabled); + Configuration setWildcardRoutingEnabled(boolean enabled); /** * Returns the timeout (in milliseconds) after which transactions is removed from the resource @@ -790,7 +796,7 @@ public interface Configuration extends Serializable * Sets the timeout (in milliseconds) after which transactions is removed * from the resource manager after it was created. */ - void setTransactionTimeout(long timeout); + Configuration setTransactionTimeout(long timeout); /** * Returns whether message counter is enabled for this server.
@@ -801,7 +807,7 @@ public interface Configuration extends Serializable /** * Sets whether message counter is enabled for this server. */ - void setMessageCounterEnabled(boolean enabled); + Configuration setMessageCounterEnabled(boolean enabled); /** * Returns the sample period (in milliseconds) to take message counter snapshot.
@@ -814,7 +820,7 @@ public interface Configuration extends Serializable * * @param period value must be greater than 1000ms */ - void setMessageCounterSamplePeriod(long period); + Configuration setMessageCounterSamplePeriod(long period); /** * Returns the maximum number of days kept in memory for message counter.
@@ -827,7 +833,7 @@ public interface Configuration extends Serializable * * @param maxDayHistory value must be greater than 0 */ - void setMessageCounterMaxDayHistory(int maxDayHistory); + Configuration setMessageCounterMaxDayHistory(int maxDayHistory); /** * Returns the frequency (in milliseconds) to scan transactions to detect which transactions have @@ -840,7 +846,7 @@ public interface Configuration extends Serializable * Sets the frequency (in milliseconds) to scan transactions to detect which transactions * have timed out. */ - void setTransactionTimeoutScanPeriod(long period); + Configuration setTransactionTimeoutScanPeriod(long period); /** * Returns the frequency (in milliseconds) to scan messages to detect which messages have @@ -853,7 +859,7 @@ public interface Configuration extends Serializable * Sets the frequency (in milliseconds) to scan messages to detect which messages * have expired. */ - void setMessageExpiryScanPeriod(long messageExpiryScanPeriod); + Configuration setMessageExpiryScanPeriod(long messageExpiryScanPeriod); /** * Returns the priority of the thread used to scan message expiration.
@@ -864,7 +870,7 @@ public interface Configuration extends Serializable /** * Sets the priority of the thread used to scan message expiration. */ - void setMessageExpiryThreadPriority(int messageExpiryThreadPriority); + Configuration setMessageExpiryThreadPriority(int messageExpiryThreadPriority); /** * @return A list of AddressSettings per matching to be deployed to the address settings repository @@ -875,19 +881,23 @@ public interface Configuration extends Serializable * @param addressesSettings list of AddressSettings per matching to be deployed to the address * settings repository */ - void setAddressesSettings(Map addressesSettings); + Configuration setAddressesSettings(Map addressesSettings); + + Configuration addAddressesSetting(String key, AddressSettings addressesSetting); /** * @param roles a list of roles per matching */ - void setSecurityRoles(Map> roles); + Configuration setSecurityRoles(Map> roles); /** * @return a list of roles per matching */ Map> getSecurityRoles(); - void setConnectorServiceConfigurations(List configs); + Configuration setConnectorServiceConfigurations(List configs); + + Configuration addConnectorServiceConfiguration(ConnectorServiceConfiguration config); /** * @return list of {@link ConnectorServiceConfiguration} @@ -897,7 +907,7 @@ public interface Configuration extends Serializable /** * Returns the delay to wait before fail-back occurs on restart. * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#getFailbackDelay()} + * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.BackupPolicy#getFailbackDelay()} */ @Deprecated long getFailbackDelay(); @@ -905,10 +915,10 @@ public interface Configuration extends Serializable /** * Sets the fail-back delay. * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setFailbackDelay(long)} + * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.BackupPolicy#setFailbackDelay(long)} */ @Deprecated - void setFailbackDelay(long delay); + Configuration setFailbackDelay(long delay); /** * Whether to check if the cluster already has a (live) node with our node-ID. @@ -920,6 +930,7 @@ public interface Configuration extends Serializable * * @return true if we want to make the check */ + @Deprecated boolean isCheckForLiveServer(); /** @@ -932,12 +943,13 @@ public interface Configuration extends Serializable * * @param checkForLiveServer true if we want to make the check */ - void setCheckForLiveServer(boolean checkForLiveServer); + @Deprecated + Configuration setCheckForLiveServer(boolean checkForLiveServer); /** * The default password decoder */ - void setPasswordCodec(String codec); + Configuration setPasswordCodec(String codec); /** * Gets the default password decoder @@ -947,7 +959,7 @@ public interface Configuration extends Serializable /** * Sets if passwords should be masked or not. True means the passwords should be masked. */ - void setMaskPassword(boolean maskPassword); + Configuration setMaskPassword(boolean maskPassword); /** * If passwords are masked. True means the passwords are masked. @@ -962,46 +974,26 @@ public interface Configuration extends Serializable * * @param clusterName * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setReplicationClustername(String)} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ + @Deprecated - void setReplicationClustername(String clusterName); + Configuration setReplicationClustername(String clusterName); /** * @return name of the cluster configuration to use * @see #setReplicationClustername(String) * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#getReplicationClustername()} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated String getReplicationClustername(); - /** - * Name of the cluster configuration to use for scaling down. - *

- * Only applicable for servers with more than one cluster configuration. - * - * @param clusterName - * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setScaleDownClustername(String)} - */ - @Deprecated - void setScaleDownClustername(String clusterName); - - /** - * @return name of the cluster configuration to use - * @see #setScaleDownClustername(String) - * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#getScaleDownClustername()} - */ - @Deprecated - String getScaleDownClustername(); - /* * Whether or not that HornetQ should use all protocols available on the classpath. If false only the core protocol will * be set, any other protocols will need to be set directly on the HornetQServer * */ - void setResolveProtocols(boolean resolveProtocols); + Configuration setResolveProtocols(boolean resolveProtocols); /* * @see #setResolveProtocols() @@ -1018,41 +1010,27 @@ public interface Configuration extends Serializable * * @param maxSavedReplicatedJournalsSize * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#getMaxSavedReplicatedJournalsSize()} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated - void setMaxSavedReplicatedJournalSize(int maxSavedReplicatedJournalsSize); + Configuration setMaxSavedReplicatedJournalSize(int maxSavedReplicatedJournalsSize); /** * @return the number of backup journals to keep after failback has occurred * @see #setMaxSavedReplicatedJournalSize(int) * - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#getMaxSavedReplicatedJournalsSize()} + * @deprecated you should replace by using the correct{@link org.hornetq.core.server.cluster.ha.HAPolicy} */ @Deprecated int getMaxSavedReplicatedJournalsSize(); - Set getBackupServerConfigurations(); - Configuration copy() throws Exception; - /** - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#setBackupStrategy(BackupStrategy)} - */ - @Deprecated - void setBackupStrategy(BackupStrategy strategy); - - /** - * @deprecated replaced by {@link org.hornetq.core.server.cluster.ha.HAPolicy#getBackupStrategy()} - */ - @Deprecated - BackupStrategy getBackupStrategy(); - - void setJournalLockAcquisitionTimeout(long journalLockAcquisitionTimeout); + Configuration setJournalLockAcquisitionTimeout(long journalLockAcquisitionTimeout); long getJournalLockAcquisitionTimeout(); - HAPolicy getHAPolicy(); + HAPolicyConfiguration getHAPolicyConfiguration(); - void setHAPolicy(HAPolicy haPolicy); + Configuration setHAPolicyConfiguration(HAPolicyConfiguration haPolicyConfiguration); }