[ARTEMIS-561] Using long for counters, and renaming variables

This commit is contained in:
Clebert Suconic 2016-06-09 14:14:18 -04:00
parent 0ed7f586a8
commit d554301c70
2 changed files with 12 additions and 12 deletions

View File

@ -90,9 +90,9 @@ public interface JMSBridge extends ActiveMQComponent {
boolean isFailed();
int getMessageCount();
long getMessageCount();
int getabortedMessageCount();
long getAbortedMessageCount();
void setSourceConnectionFactoryFactory(ConnectionFactoryFactory cff);

View File

@ -181,9 +181,9 @@ public final class JMSBridgeImpl implements JMSBridge {
private ClassLoader moduleTccl;
private int message_count = 0;
private long messageCount = 0;
private int aborted_message_count = 0;
private long abortedMessageCount = 0;
/*
* Constructor for MBean
@ -492,7 +492,7 @@ public final class JMSBridgeImpl implements JMSBridge {
try {
tx.rollback();
aborted_message_count += messages.size();
abortedMessageCount += messages.size();
}
catch (Exception ignore) {
if (JMSBridgeImpl.trace) {
@ -780,13 +780,13 @@ public final class JMSBridgeImpl implements JMSBridge {
}
@Override
public synchronized int getMessageCount() {
return message_count;
public synchronized long getMessageCount() {
return messageCount;
}
@Override
public synchronized int getabortedMessageCount() {
return aborted_message_count;
public synchronized long getAbortedMessageCount() {
return abortedMessageCount;
}
@Override
@ -1214,7 +1214,7 @@ public final class JMSBridgeImpl implements JMSBridge {
try {
// Terminate the tx
tx.rollback();
aborted_message_count += messages.size();
abortedMessageCount += messages.size();
}
catch (Throwable ignore) {
if (JMSBridgeImpl.trace) {
@ -1414,7 +1414,7 @@ public final class JMSBridgeImpl implements JMSBridge {
try {
// we call this just in case there is a failure other than failover
tx.rollback();
aborted_message_count += messages.size();
abortedMessageCount += messages.size();
}
catch (Throwable ignored) {
}
@ -1511,7 +1511,7 @@ public final class JMSBridgeImpl implements JMSBridge {
targetProducer.send(targetDestination, msg, msg.getJMSDeliveryMode(), msg.getJMSPriority(), timeToLive);
if (msg != null)
message_count++;
messageCount++;
if (JMSBridgeImpl.trace) {
ActiveMQJMSBridgeLogger.LOGGER.trace("Sent message " + msg);
}