Author: clebert.suconic(a)jboss.com
Date: 2011-10-11 12:49:46 -0400 (Tue, 11 Oct 2011)
New Revision: 11511
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/Pair.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/TopologyMember.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileDeploymentManager.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/SecurityDeployer.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractJournalUpdateTask.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalRecord.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PageTransactionInfoImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompSession.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/config/impl/TransportConfigurationEncodingSupport.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/journal/NIOJournalCompactTest.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java
Log:
encapsulating Pair access
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/Pair.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/Pair.java 2011-10-11 16:49:21
UTC (rev 11510)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/Pair.java 2011-10-11 16:49:46
UTC (rev 11511)
@@ -33,9 +33,9 @@
this.b = b;
}
- public A a;
+ private A a;
- public B b;
+ private B b;
private int hash = -1;
@@ -81,4 +81,26 @@
{
return "Pair[a=" + a + ", b=" + b + "]";
}
+
+ public void setA(A a)
+ {
+ hash = -1;
+ this.a = a;
+ }
+
+ public A getA()
+ {
+ return a;
+ }
+
+ public void setB(B b)
+ {
+ hash = -1;
+ this.b = b;
+ }
+
+ public B getB()
+ {
+ return b;
+ }
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -513,7 +513,7 @@
Pair<TransportConfiguration, TransportConfiguration> pair =
topologyArray[pos];
- return pair.a;
+ return pair.getA();
}
else
{
@@ -1329,19 +1329,19 @@
log.debug("NodeUp " + this + "::nodeID=" + nodeID + ",
connectorPair=" + connectorPair, new Exception("trace"));
}
- TopologyMember member = new TopologyMember(connectorPair.a, connectorPair.b);
+ TopologyMember member = new TopologyMember(connectorPair.getA(),
connectorPair.getB());
if (topology.updateMember(uniqueEventID, nodeID, member))
{
TopologyMember actMember = topology.getMember(nodeID);
- if (actMember != null && actMember.getConnector().a != null &&
actMember.getConnector().b != null)
+ if (actMember != null && actMember.getConnector().getA() != null
&& actMember.getConnector().getB() != null)
{
for (ClientSessionFactory factory : factories)
{
-
((ClientSessionFactoryInternal)factory).setBackupConnector(actMember.getConnector().a,
-
actMember.getConnector().b);
+
((ClientSessionFactoryInternal)factory).setBackupConnector(actMember.getConnector().getA(),
+
actMember.getConnector().getB());
}
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/TopologyMember.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/TopologyMember.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/TopologyMember.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -43,22 +43,22 @@
public TransportConfiguration getA()
{
- return connector.a;
+ return connector.getA();
}
public TransportConfiguration getB()
{
- return connector.b;
+ return connector.getB();
}
public void setB(final TransportConfiguration param)
{
- connector.b = param;
+ connector.setB(param);
}
public void setA(final TransportConfiguration param)
{
- connector.a = param;
+ connector.setA(param);
}
/**
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/AddressSettingsDeployer.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -66,7 +66,7 @@
Pair<String, AddressSettings> setting = parser.parseAddressSettings(node);
- addressSettingsRepository.addMatch(setting.a, setting.b);
+ addressSettingsRepository.addMatch(setting.getA(), setting.getB());
}
@Override
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileConfigurationParser.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -603,7 +603,7 @@
for (int i = 0; i < list.getLength(); i++)
{
Pair<String, Set<Role>> securityItem =
parseSecurityRoles(list.item(i));
- config.getSecurityRoles().put(securityItem.a, securityItem.b);
+ config.getSecurityRoles().put(securityItem.getA(), securityItem.getB());
}
}
}
@@ -643,7 +643,7 @@
for (int i = 0; i < list.getLength(); i++)
{
Pair<String, AddressSettings> addressSettings =
parseAddressSettings(list.item(i));
- config.getAddressesSettings().put(addressSettings.a, addressSettings.b);
+ config.getAddressesSettings().put(addressSettings.getA(),
addressSettings.getB());
}
}
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileDeploymentManager.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileDeploymentManager.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/FileDeploymentManager.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -231,18 +231,18 @@
for (Map.Entry<Pair<URL, Deployer>, DeployInfo> entry :
deployed.entrySet())
{
Pair<URL, Deployer> pair = entry.getKey();
- if (!fileExists(pair.a))
+ if (!fileExists(pair.getA()))
{
try
{
Deployer deployer = entry.getValue().deployer;
- FileDeploymentManager.log.debug("Undeploying " + deployer +
" with url " + pair.a);
- deployer.undeploy(pair.a);
+ FileDeploymentManager.log.debug("Undeploying " + deployer +
" with url " + pair.getA());
+ deployer.undeploy(pair.getA());
toRemove.add(pair);
}
catch (Exception e)
{
- FileDeploymentManager.log.error("Error undeploying " +
pair.a, e);
+ FileDeploymentManager.log.error("Error undeploying " +
pair.getA(), e);
}
}
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/SecurityDeployer.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/SecurityDeployer.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/deployers/impl/SecurityDeployer.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -88,7 +88,7 @@
public void deploy(final Node node) throws Exception
{
Pair<String, Set<Role>> securityMatch =
parser.parseSecurityRoles(node);
- securityRepository.addMatch(securityMatch.a, securityMatch.b);
+ securityRepository.addMatch(securityMatch.getA(), securityMatch.getB());
}
/**
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractJournalUpdateTask.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractJournalUpdateTask.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/AbstractJournalUpdateTask.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -143,8 +143,8 @@
filesToRename.writeInt(renames.size());
for (Pair<String, String> rename : renames)
{
- filesToRename.writeUTF(rename.a);
- filesToRename.writeUTF(rename.b);
+ filesToRename.writeUTF(rename.getA());
+ filesToRename.writeUTF(rename.getB());
}
}
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -3094,14 +3094,14 @@
for (Pair<String, String> rename : renames)
{
- SequentialFile fileTmp = fileFactory.createSequentialFile(rename.a, 1);
- SequentialFile fileTo = fileFactory.createSequentialFile(rename.b, 1);
+ SequentialFile fileTmp = fileFactory.createSequentialFile(rename.getA(), 1);
+ SequentialFile fileTo = fileFactory.createSequentialFile(rename.getB(), 1);
// We should do the rename only if the tmp file still exist, or else we
could
// delete a valid file depending on where the crash occured during the
control file delete
if (fileTmp.exists())
{
fileTo.delete();
- fileTmp.renameTo(rename.b);
+ fileTmp.renameTo(rename.getB());
}
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalRecord.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalRecord.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/impl/JournalRecord.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -68,8 +68,8 @@
{
for (Pair<JournalFile, Integer> updFile : updateFiles)
{
- file.incNegCount(updFile.a);
- updFile.a.decSize(updFile.b);
+ file.incNegCount(updFile.getA());
+ updFile.getA().decSize(updFile.getB());
}
}
}
@@ -85,7 +85,7 @@
for (Pair<JournalFile, Integer> update : updateFiles)
{
- buffer.append(", update=" + update.a.getFile().getFileName());
+ buffer.append(", update=" +
update.getA().getFile().getFileName());
}
}
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java 2011-10-11
16:49:21 UTC (rev 11510)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/PrintPages.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -81,7 +81,7 @@
Pair<Map<Long, Set<PagePosition>>, Set<Long>> cursorACKs
= PrintPages.loadCursorACKs(arg[1]);
- Set<Long> pgTXs = cursorACKs.b;
+ Set<Long> pgTXs = cursorACKs.getB();
ScheduledExecutorService scheduled = Executors.newScheduledThreadPool(1);
final ExecutorService executor = Executors.newFixedThreadPool(10);
@@ -133,7 +133,7 @@
boolean acked = false;
- Set<PagePosition> positions = cursorACKs.a.get(q[i]);
+ Set<PagePosition> positions = cursorACKs.getA().get(q[i]);
if (positions != null)
{
acked = positions.contains(posCheck);
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -198,8 +198,8 @@
{
for (Pair<Long, Integer> incElement : loadList)
{
- value.addAndGet(incElement.b);
- incrementRecords.add(incElement.a);
+ value.addAndGet(incElement.getB());
+ incrementRecords.add(incElement.getA());
}
loadList.clear();
loadList = null;
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PageTransactionInfoImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PageTransactionInfoImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/paging/impl/PageTransactionInfoImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -160,7 +160,7 @@
// This is to make sure deliveries that were touched before the commit arrived
will be delivered
for (Pair<PageSubscription, PagePosition> pos : lateDeliveries)
{
- pos.a.redeliver(pos.b);
+ pos.getA().redeliver(pos.getB());
}
lateDeliveries.clear();
}
@@ -262,7 +262,7 @@
{
for (Pair<PageSubscription, PagePosition> pos : lateDeliveries)
{
- pos.a.lateDeliveryRollback(pos.b);
+ pos.getA().lateDeliveryRollback(pos.getB());
}
lateDeliveries = null;
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -88,9 +88,9 @@
{
if (count < cacheSize)
{
- ByteArrayHolder bah = new ByteArrayHolder(id.a);
+ ByteArrayHolder bah = new ByteArrayHolder(id.getA());
- Pair<ByteArrayHolder, Long> pair = new Pair<ByteArrayHolder,
Long>(bah, id.b);
+ Pair<ByteArrayHolder, Long> pair = new Pair<ByteArrayHolder,
Long>(bah, id.getB());
cache.put(bah, ids.size());
@@ -104,7 +104,7 @@
txID = storageManager.generateUniqueID();
}
- storageManager.deleteDuplicateIDTransactional(txID, id.b);
+ storageManager.deleteDuplicateIDTransactional(txID, id.getB());
}
count++;
@@ -139,11 +139,11 @@
{
id = ids.get(posUsed.intValue());
- if (id.a.equals(bah))
+ if (id.getA().equals(bah))
{
- id.a = null;
- storageManager.deleteDuplicateID(id.b);
- id.b = null;
+ id.setA(null);
+ storageManager.deleteDuplicateID(id.getB());
+ id.setB(null);
}
}
}
@@ -205,19 +205,19 @@
id = ids.get(pos);
// The id here might be null if it was explicit deleted
- if (id.a != null)
+ if (id.getA() != null)
{
- cache.remove(id.a);
+ cache.remove(id.getA());
// Record already exists - we delete the old one and add the new one
// Note we can't use update since journal update doesn't let older
records get
// reclaimed
- if (id.b != null)
+ if (id.getB() != null)
{
try
{
- storageManager.deleteDuplicateID(id.b);
+ storageManager.deleteDuplicateID(id.getB());
}
catch (Exception e)
{
@@ -226,11 +226,11 @@
}
}
- id.a = holder;
+ id.setA(holder);
// The recordID could be negative if the duplicateCache is configured to not
persist,
// -1 would mean null on this case
- id.b = recordID >= 0 ? recordID : null;
+ id.setB(recordID >= 0 ? recordID : null);
holder.pos = pos;
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -99,19 +99,19 @@
buffer.writeString(nodeID);
if (!exit)
{
- if (pair.a != null)
+ if (pair.getA() != null)
{
buffer.writeBoolean(true);
- pair.a.encode(buffer);
+ pair.getA().encode(buffer);
}
else
{
buffer.writeBoolean(false);
}
- if (pair.b != null)
+ if (pair.getB() != null)
{
buffer.writeBoolean(true);
- pair.b.encode(buffer);
+ pair.getB().encode(buffer);
}
else
{
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -113,19 +113,19 @@
buffer.writeLong(uniqueEventID);
if (!exit)
{
- if (pair.a != null)
+ if (pair.getA() != null)
{
buffer.writeBoolean(true);
- pair.a.encode(buffer);
+ pair.getA().encode(buffer);
}
else
{
buffer.writeBoolean(false);
}
- if (pair.b != null)
+ if (pair.getB() != null)
{
buffer.writeBoolean(true);
- pair.b.encode(buffer);
+ pair.getB().encode(buffer);
}
else
{
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompSession.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompSession.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/protocol/stomp/StompSession.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -205,8 +205,8 @@
if (pair != null)
{
- long consumerID = pair.a;
- int credits = pair.b;
+ long consumerID = pair.getA();
+ int credits = pair.getB();
if (this.consumerCredits != -1)
{
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -520,11 +520,11 @@
log.debug(this + "::NodeAnnounced, backup=" + backup + nodeID +
connectorPair);
}
- TopologyMember newMember = new TopologyMember(connectorPair.a, connectorPair.b);
+ TopologyMember newMember = new TopologyMember(connectorPair.getA(),
connectorPair.getB());
newMember.setUniqueEventID(uniqueEventID);
if (backup)
{
- topology.updateBackup(nodeID, new TopologyMember(connectorPair.a,
connectorPair.b));
+ topology.updateBackup(nodeID, new TopologyMember(connectorPair.getA(),
connectorPair.getB()));
}
else
{
@@ -541,8 +541,8 @@
sf.sendNodeAnnounce(localMember.getUniqueEventID(),
manager.getNodeId(),
false,
- localMember.getConnector().a,
- localMember.getConnector().b);
+ localMember.getConnector().getA(),
+ localMember.getConnector().getB());
// sf.sendNodeAnnounce(System.currentTimeMillis(),
// manager.getNodeId(),
@@ -743,7 +743,7 @@
}
// if the node is more than 1 hop away, we do not create a bridge for direct
cluster connection
- if (allowDirectConnectionsOnly &&
!allowableConnections.contains(connectorPair.a))
+ if (allowDirectConnectionsOnly &&
!allowableConnections.contains(connectorPair.getA()))
{
return;
}
@@ -755,7 +755,7 @@
return;
}
/*we dont create bridges to backups*/
- if (connectorPair.a == null)
+ if (connectorPair.getA() == null)
{
if (isTrace)
{
@@ -801,7 +801,7 @@
queue = server.createQueue(queueName, queueName, null, true, false);
}
- createNewRecord(eventUID, nodeID, connectorPair.a, queueName, queue,
true);
+ createNewRecord(eventUID, nodeID, connectorPair.getA(), queueName, queue,
true);
}
else
{
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -1607,8 +1607,8 @@
{
log.info("Deleting pending large message as it wasn't completed:"
+ msgToDelete);
LargeServerMessage msg = storageManager.createLargeMessage();
- msg.setMessageID(msgToDelete.b);
- msg.setPendingRecordID(msgToDelete.a);
+ msg.setMessageID(msgToDelete.getB());
+ msg.setPendingRecordID(msgToDelete.getA());
msg.setDurable(true);
msg.deleteFile();
}
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -1239,7 +1239,7 @@
Pair<UUID, AtomicLong> value =
targetAddressInfos.get(SimpleString.toSimpleString(address));
if (value != null)
{
- return value.a.toString();
+ return value.getA().toString();
}
else
{
@@ -1265,8 +1265,8 @@
producerInfo.put("connectionID", this.getConnectionID().toString());
producerInfo.put("sessionID", this.getName());
producerInfo.put("destination", entry.getKey().toString());
- producerInfo.put("lastUUIDSent", entry.getValue().a);
- producerInfo.put("msgSent", entry.getValue().b.longValue());
+ producerInfo.put("lastUUIDSent", entry.getValue().getA());
+ producerInfo.put("msgSent", entry.getValue().getB().longValue());
array.put(producerInfo);
}
}
@@ -1411,8 +1411,8 @@
}
else
{
- value.a = msg.getUserID();
- value.b.incrementAndGet();
+ value.setA(msg.getUserID());
+ value.getB().incrementAndGet();
}
routingContext.clear();
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -296,8 +296,8 @@
{
Pair<String, String> pair =
HornetQDestination.decomposeQueueNameForDurableSubscription(queue.getName()
.toString());
- clientID = pair.a;
- subName = pair.b;
+ clientID = pair.getA();
+ subName = pair.getB();
}
String filter = queue.getFilter() != null ? queue.getFilter() : null;
@@ -330,8 +330,8 @@
{
Pair<String, String> pair =
HornetQDestination.decomposeQueueNameForDurableSubscription(queue.getName()
.toString());
- clientID = pair.a;
- subName = pair.b;
+ clientID = pair.getA();
+ subName = pair.getB();
}
String filter = queue.getFilter() != null ? queue.getFilter() : null;
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/config/impl/TransportConfigurationEncodingSupport.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/config/impl/TransportConfigurationEncodingSupport.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/config/impl/TransportConfigurationEncodingSupport.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -78,12 +78,12 @@
{
for (Pair<TransportConfiguration, TransportConfiguration> pair : configs)
{
- encode(buffer, pair.a);
- boolean backup = (pair.b != null);
+ encode(buffer, pair.getA());
+ boolean backup = (pair.getB() != null);
buffer.writeBoolean(backup);
if (backup)
{
- encode(buffer, pair.b);
+ encode(buffer, pair.getB());
}
}
}
@@ -122,11 +122,11 @@
{
for (Pair<TransportConfiguration, TransportConfiguration> pair : configs)
{
- size += getEncodeSize(pair.a);
+ size += getEncodeSize(pair.getA());
size += DataConstants.SIZE_BOOLEAN; // whether there is a backup config
- if (pair.b != null)
+ if (pair.getB() != null)
{
- size += getEncodeSize(pair.b);
+ size += getEncodeSize(pair.getB());
}
}
}
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -438,14 +438,14 @@
public void nodeUP(final long uniqueEventID, String nodeID,
Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last)
{
- if (connectorPair.a != null &&
!liveNode.contains(connectorPair.a.getName()))
+ if (connectorPair.getA() != null &&
!liveNode.contains(connectorPair.getA().getName()))
{
- liveNode.add(connectorPair.a.getName());
+ liveNode.add(connectorPair.getA().getName());
latch.countDown();
}
- if (connectorPair.b != null &&
!backupNode.contains(connectorPair.b.getName()))
+ if (connectorPair.getB() != null &&
!backupNode.contains(connectorPair.getB().getName()))
{
- backupNode.add(connectorPair.b.getName());
+ backupNode.add(connectorPair.getB().getName());
latch.countDown();
}
}
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/failover/MultipleBackupsFailoverTestBase.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -236,14 +236,14 @@
Pair<TransportConfiguration, TransportConfiguration>
connectorPair,
boolean last)
{
- if (connectorPair.a != null &&
!liveNode.contains(connectorPair.a.getName()))
+ if (connectorPair.getA() != null &&
!liveNode.contains(connectorPair.getA().getName()))
{
- liveNode.add(connectorPair.a.getName());
+ liveNode.add(connectorPair.getA().getName());
latch.countDown();
}
- if (connectorPair.b != null &&
!backupNode.contains(connectorPair.b.getName()))
+ if (connectorPair.getB() != null &&
!backupNode.contains(connectorPair.getB().getName()))
{
- backupNode.add(connectorPair.b.getName());
+ backupNode.add(connectorPair.getB().getName());
latch.countDown();
}
}
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/jms/server/management/JMSUtil.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -300,14 +300,14 @@
Pair<TransportConfiguration, TransportConfiguration>
connectorPair,
boolean last)
{
- if (connectorPair.a != null &&
!liveNode.contains(connectorPair.a.getName()))
+ if (connectorPair.getA() != null &&
!liveNode.contains(connectorPair.getA().getName()))
{
- liveNode.add(connectorPair.a.getName());
+ liveNode.add(connectorPair.getA().getName());
latch.countDown();
}
- if (connectorPair.b != null &&
!backupNode.contains(connectorPair.b.getName()))
+ if (connectorPair.getB() != null &&
!backupNode.contains(connectorPair.getB().getName()))
{
- backupNode.add(connectorPair.b.getName());
+ backupNode.add(connectorPair.getB().getName());
latch.countDown();
}
}
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/journal/NIOJournalCompactTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/journal/NIOJournalCompactTest.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/journal/NIOJournalCompactTest.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -125,8 +125,8 @@
for (Pair<String, String> rename : renamesRead)
{
Pair<String, String> original = iterRename.next();
- Assert.assertEquals(original.a, rename.a);
- Assert.assertEquals(original.b, rename.b);
+ Assert.assertEquals(original.getA(), rename.getA());
+ Assert.assertEquals(original.getB(), rename.getB());
}
Assert.assertFalse(iterNewFiles.hasNext());
@@ -720,20 +720,20 @@
{
if (postXA)
{
- prepare(tx.a, new SimpleEncoding(10, (byte)0));
+ prepare(tx.getA(), new SimpleEncoding(10, (byte)0));
}
- if (tx.a % 2 == 0)
+ if (tx.getA() % 2 == 0)
{
- commit(tx.a);
+ commit(tx.getA());
if (deleteTransactRecords)
{
- delete(tx.b);
+ delete(tx.getB());
}
}
else
{
- rollback(tx.a);
+ rollback(tx.getA());
}
}
}
@@ -762,20 +762,20 @@
{
if (postXA)
{
- prepare(tx.a, new SimpleEncoding(10, (byte)0));
+ prepare(tx.getA(), new SimpleEncoding(10, (byte)0));
}
- if (tx.a % 2 == 0)
+ if (tx.getA() % 2 == 0)
{
- commit(tx.a);
+ commit(tx.getA());
if (deleteTransactRecords)
{
- delete(tx.b);
+ delete(tx.getB());
}
}
else
{
- rollback(tx.a);
+ rollback(tx.getA());
}
}
}
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java 2011-10-11
16:49:21 UTC (rev 11510)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/persistence/TransportConfigurationEncodingSupportTest.java 2011-10-11
16:49:46 UTC (rev 11511)
@@ -100,10 +100,10 @@
assertNotNull(decodedConfigs);
assertEquals(2, decodedConfigs.size());
- assertEquivalent(connectorConfigs.get(0).a, decodedConfigs.get(0).a);
- assertEquivalent(connectorConfigs.get(0).b, decodedConfigs.get(0).b);
- assertEquivalent(connectorConfigs.get(1).a, decodedConfigs.get(1).a);
- assertNull(decodedConfigs.get(1).b);
+ assertEquivalent(connectorConfigs.get(0).getA(), decodedConfigs.get(0).getA());
+ assertEquivalent(connectorConfigs.get(0).getB(), decodedConfigs.get(0).getB());
+ assertEquivalent(connectorConfigs.get(1).getA(), decodedConfigs.get(1).getA());
+ assertNull(decodedConfigs.get(1).getB());
}
// decoded TransportConfiguration have parameter values as String instead of primitive
type