This closes #430

This commit is contained in:
jbertram 2016-04-04 11:03:48 -05:00
commit bd5a78802f
10 changed files with 26 additions and 0 deletions

View File

@ -154,6 +154,7 @@ public class ActiveMQSessionContext extends SessionContext {
} }
} }
@Override
public int getReconnectID() { public int getReconnectID() {
return sessionChannel.getReconnectID(); return sessionChannel.getReconnectID();
} }

View File

@ -142,6 +142,7 @@ public final class ChannelImpl implements Channel {
this.interceptors = interceptors; this.interceptors = interceptors;
} }
@Override
public int getReconnectID() { public int getReconnectID() {
return reconnectID.get(); return reconnectID.get();
} }
@ -217,6 +218,7 @@ public final class ChannelImpl implements Channel {
return send(packet, -1, false, false); return send(packet, -1, false, false);
} }
@Override
public boolean send(Packet packet, final int reconnectID) { public boolean send(Packet packet, final int reconnectID) {
return send(packet, reconnectID, false, false); return send(packet, reconnectID, false, false);
} }

View File

@ -700,10 +700,12 @@ public class JDBCJournalImpl implements Journal {
return null; return null;
} }
@Override
public final void synchronizationLock() { public final void synchronizationLock() {
journalLock.writeLock().lock(); journalLock.writeLock().lock();
} }
@Override
public final void synchronizationUnlock() { public final void synchronizationUnlock() {
journalLock.writeLock().unlock(); journalLock.writeLock().unlock();
} }

View File

@ -56,10 +56,12 @@ public class JDBCJournalLoaderCallback implements LoaderCallback {
} }
} }
@Override
public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) {
preparedTransactions.add(preparedTransaction); preparedTransactions.add(preparedTransaction);
} }
@Override
public synchronized void addRecord(final RecordInfo info) { public synchronized void addRecord(final RecordInfo info) {
int index = committedRecords.size(); int index = committedRecords.size();
committedRecords.add(index, info); committedRecords.add(index, info);
@ -71,11 +73,13 @@ public class JDBCJournalLoaderCallback implements LoaderCallback {
checkMaxId(info.id); checkMaxId(info.id);
} }
@Override
public synchronized void updateRecord(final RecordInfo info) { public synchronized void updateRecord(final RecordInfo info) {
int index = committedRecords.size(); int index = committedRecords.size();
committedRecords.add(index, info); committedRecords.add(index, info);
} }
@Override
public synchronized void deleteRecord(final long id) { public synchronized void deleteRecord(final long id) {
for (Integer i : deleteReferences.get(id)) { for (Integer i : deleteReferences.get(id)) {
committedRecords.remove(i); committedRecords.remove(i);

View File

@ -37,18 +37,22 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback {
this.loadManager = loadManager; this.loadManager = loadManager;
} }
@Override
public void onReadAddRecord(final RecordInfo info) throws Exception { public void onReadAddRecord(final RecordInfo info) throws Exception {
loadManager.addRecord(info); loadManager.addRecord(info);
} }
@Override
public void onReadUpdateRecord(final RecordInfo info) throws Exception { public void onReadUpdateRecord(final RecordInfo info) throws Exception {
loadManager.updateRecord(info); loadManager.updateRecord(info);
} }
@Override
public void onReadDeleteRecord(final long recordID) throws Exception { public void onReadDeleteRecord(final long recordID) throws Exception {
loadManager.deleteRecord(recordID); loadManager.deleteRecord(recordID);
} }
@Override
public void onReadUpdateRecordTX(final long transactionID, final RecordInfo info) throws Exception { public void onReadUpdateRecordTX(final long transactionID, final RecordInfo info) throws Exception {
TransactionHolder tx = loadTransactions.get(transactionID); TransactionHolder tx = loadTransactions.get(transactionID);
if (tx == null) { if (tx == null) {
@ -58,6 +62,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback {
tx.recordInfos.add(info); tx.recordInfos.add(info);
} }
@Override
public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception { public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception {
TransactionHolder tx = loadTransactions.get(transactionID); TransactionHolder tx = loadTransactions.get(transactionID);
if (tx == null) { if (tx == null) {
@ -67,6 +72,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback {
tx.recordInfos.add(info); tx.recordInfos.add(info);
} }
@Override
public void onReadDeleteRecordTX(final long transactionID, final RecordInfo info) throws Exception { public void onReadDeleteRecordTX(final long transactionID, final RecordInfo info) throws Exception {
TransactionHolder tx = loadTransactions.get(transactionID); TransactionHolder tx = loadTransactions.get(transactionID);
if (tx == null) { if (tx == null) {
@ -76,6 +82,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback {
tx.recordsToDelete.add(info); tx.recordsToDelete.add(info);
} }
@Override
public void onReadPrepareRecord(final long transactionID, public void onReadPrepareRecord(final long transactionID,
final byte[] extraData, final byte[] extraData,
final int numberOfRecords) throws Exception { final int numberOfRecords) throws Exception {
@ -88,6 +95,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback {
tx.extraData = extraData; tx.extraData = extraData;
} }
@Override
public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception {
// It is possible that the TX could be null, since deletes could have happened in the journal. // It is possible that the TX could be null, since deletes could have happened in the journal.
TransactionHolder tx = loadTransactions.get(transactionID); TransactionHolder tx = loadTransactions.get(transactionID);
@ -106,6 +114,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback {
} }
} }
@Override
public void onReadRollbackRecord(final long transactionID) throws Exception { public void onReadRollbackRecord(final long transactionID) throws Exception {
TransactionHolder tx = loadTransactions.remove(transactionID); TransactionHolder tx = loadTransactions.remove(transactionID);
if (tx == null) { if (tx == null) {

View File

@ -82,6 +82,7 @@ public class EmbeddedJMS extends EmbeddedActiveMQ {
} }
@Override
public EmbeddedJMS setConfiguration(Configuration configuration) { public EmbeddedJMS setConfiguration(Configuration configuration) {
super.setConfiguration(configuration); super.setConfiguration(configuration);
return this; return this;

View File

@ -58,6 +58,7 @@ public class ProtonHandlerImpl extends ProtonInitializable implements ProtonHand
private final Executor dispatchExecutor; private final Executor dispatchExecutor;
private final Runnable dispatchRunnable = new Runnable() { private final Runnable dispatchRunnable = new Runnable() {
@Override
public void run() { public void run() {
dispatch(); dispatch();
} }

View File

@ -35,6 +35,7 @@ public abstract class AbstractAcceptor implements Acceptor {
/** /**
* This will update the list of interceptors for each ProtocolManager inside the acceptor. * This will update the list of interceptors for each ProtocolManager inside the acceptor.
* */ * */
@Override
public void updateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors) { public void updateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors) {
for (ProtocolManager manager : protocolMap.values()) { for (ProtocolManager manager : protocolMap.values()) {
manager.updateInterceptors(incomingInterceptors, outgoingInterceptors); manager.updateInterceptors(incomingInterceptors, outgoingInterceptors);

View File

@ -87,6 +87,7 @@ public class InMemoryDirectoryServiceFactory implements DirectoryServiceFactory
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public void init(String name) throws Exception { public void init(String name) throws Exception {
if ((directoryService != null) && directoryService.isStarted()) { if ((directoryService != null) && directoryService.isStarted()) {
return; return;
@ -154,6 +155,7 @@ public class InMemoryDirectoryServiceFactory implements DirectoryServiceFactory
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public DirectoryService getDirectoryService() throws Exception { public DirectoryService getDirectoryService() throws Exception {
return directoryService; return directoryService;
} }
@ -161,6 +163,7 @@ public class InMemoryDirectoryServiceFactory implements DirectoryServiceFactory
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public PartitionFactory getPartitionFactory() throws Exception { public PartitionFactory getPartitionFactory() throws Exception {
return partitionFactory; return partitionFactory;
} }

View File

@ -62,6 +62,7 @@ public class LargeMessageOverReplicationTest extends ActiveMQTestBase {
MessageProducer producer; MessageProducer producer;
@Override
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
@ -214,6 +215,7 @@ public class LargeMessageOverReplicationTest extends ActiveMQTestBase {
if (messageChunkCount == 100) { if (messageChunkCount == 100) {
final CountDownLatch latch = new CountDownLatch(1); final CountDownLatch latch = new CountDownLatch(1);
new Thread() { new Thread() {
@Override
public void run() { public void run() {
try { try {
latch.countDown(); latch.countDown();