Author: borges
Date: 2011-09-08 12:12:12 -0400 (Thu, 08 Sep 2011)
New Revision: 11306
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicatedJournal.java
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/FileWrapperJournal.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
Log:
HORNETQ-720 Add new methods to Journal implementations.
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicatedJournal.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicatedJournal.java 2011-09-08
15:35:08 UTC (rev 11305)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicatedJournal.java 2011-09-08
16:12:12 UTC (rev 11306)
@@ -14,6 +14,7 @@
package org.hornetq.core.replication.impl;
import java.util.List;
+import java.util.Map;
import org.hornetq.core.journal.EncodingSupport;
import org.hornetq.core.journal.IOCompletion;
@@ -23,6 +24,7 @@
import org.hornetq.core.journal.PreparedTransactionInfo;
import org.hornetq.core.journal.RecordInfo;
import org.hornetq.core.journal.TransactionFailureCallback;
+import org.hornetq.core.journal.impl.JournalFile;
import org.hornetq.core.journal.impl.dataformat.ByteArrayEncoding;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.persistence.OperationContext;
@@ -576,6 +578,12 @@
return localJournal.loadSyncOnly();
}
+ @Override
+ public JournalFile createFilesForBackupSync(long[] fileIds, Map<Long,
JournalFile> mapToFill) throws Exception
+ {
+ throw new UnsupportedOperationException("This method should only be called at
a replicating backup");
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified:
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/FileWrapperJournal.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/FileWrapperJournal.java 2011-09-08
15:35:08 UTC (rev 11305)
+++
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/FileWrapperJournal.java 2011-09-08
16:12:12 UTC (rev 11306)
@@ -1,6 +1,7 @@
package org.hornetq.core.journal.impl;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
@@ -257,4 +258,10 @@
{
throw new UnsupportedOperationException();
}
+
+ @Override
+ public JournalFile createFilesForBackupSync(long[] fileIds, Map<Long,
JournalFile> mapToFill) throws Exception
+ {
+ throw new UnsupportedOperationException();
+ }
}
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java 2011-09-08
15:35:08 UTC (rev 11305)
+++
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java 2011-09-08
16:12:12 UTC (rev 11306)
@@ -16,6 +16,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -51,6 +52,7 @@
import org.hornetq.core.journal.PreparedTransactionInfo;
import org.hornetq.core.journal.RecordInfo;
import org.hornetq.core.journal.TransactionFailureCallback;
+import org.hornetq.core.journal.impl.JournalFile;
import org.hornetq.core.paging.PagedMessage;
import org.hornetq.core.paging.PagingManager;
import org.hornetq.core.paging.PagingStore;
@@ -594,7 +596,7 @@
};
- static class FakeJournal implements Journal
+ static final class FakeJournal implements Journal
{
public
@@ -846,10 +848,6 @@
}
- /*
- * (non-Javadoc)
- * @see org.hornetq.core.journal.Journal#loadSyncOnly()
- */
@Override
public JournalLoadInformation loadSyncOnly() throws Exception
{
@@ -857,5 +855,12 @@
return null;
}
+ @Override
+ public JournalFile createFilesForBackupSync(long[] fileIds, Map<Long,
JournalFile> mapToFill) throws Exception
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
}