public final class ReplicationManager extends Object implements HornetQComponent
ReplicationEndpoint
.ReplicationEndpoint
Modifier and Type | Class and Description |
---|---|
static class |
ReplicationManager.ADD_OPERATION_TYPE |
Constructor and Description |
---|
ReplicationManager(CoreRemotingConnection remotingConnection,
ExecutorFactory executorFactory) |
Modifier and Type | Method and Description |
---|---|
void |
appendAddRecordTransactional(byte journalID,
ReplicationManager.ADD_OPERATION_TYPE operation,
long txID,
long id,
byte recordType,
EncodingSupport record) |
void |
appendCommitRecord(byte journalID,
long txID,
boolean sync,
boolean lineUp) |
void |
appendDeleteRecord(byte journalID,
long id) |
void |
appendDeleteRecordTransactional(byte journalID,
long txID,
long id) |
void |
appendDeleteRecordTransactional(byte journalID,
long txID,
long id,
EncodingSupport record) |
void |
appendPrepareRecord(byte journalID,
long txID,
EncodingSupport transactionData) |
void |
appendRollbackRecord(byte journalID,
long txID) |
void |
appendUpdateRecord(byte journalID,
ReplicationManager.ADD_OPERATION_TYPE operation,
long id,
byte recordType,
EncodingSupport record) |
void |
clearReplicationTokens()
Completes any pending operations.
|
Set<OperationContext> |
getActiveTokens()
A list of tokens that are still waiting for replications to be completed
|
CoreRemotingConnection |
getBackupTransportConnection()
Used while stopping the server to ensure that we freeze communications with the backup.
|
boolean |
isStarted() |
boolean |
isSynchronizing() |
void |
largeMessageBegin(long messageId) |
void |
largeMessageDelete(Long messageId) |
void |
largeMessageWrite(long messageId,
byte[] body) |
void |
pageClosed(SimpleString storeName,
int pageNumber) |
void |
pageDeleted(SimpleString storeName,
int pageNumber) |
void |
pageWrite(PagedMessage message,
int pageNumber) |
void |
sendLargeMessageIdListMessage(Map<Long,Pair<String,Long>> largeMessages)
Reserves several LargeMessage IDs in the backup.
|
OperationContext |
sendLiveIsStopping(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage)
Notifies the backup that the live server is stopping.
|
void |
sendStartSyncMessage(JournalFile[] datafiles,
JournalStorageManager.JournalContent contentType,
String nodeID,
boolean allowsAutoFailBack)
Reserve the following fileIDs in the backup server.
|
void |
sendSynchronizationDone(String nodeID)
Informs backup that data synchronization is done.
|
void |
start() |
void |
stop() |
void |
syncJournalFile(JournalFile jf,
JournalStorageManager.JournalContent content)
Sends the whole content of the file to be duplicated.
|
void |
syncLargeMessageFile(SequentialFile file,
long size,
long id) |
void |
syncPages(SequentialFile file,
long id,
SimpleString queueName) |
public ReplicationManager(CoreRemotingConnection remotingConnection, ExecutorFactory executorFactory)
remotingConnection
- public void appendUpdateRecord(byte journalID, ReplicationManager.ADD_OPERATION_TYPE operation, long id, byte recordType, EncodingSupport record) throws Exception
Exception
public void appendDeleteRecord(byte journalID, long id) throws Exception
Exception
public void appendAddRecordTransactional(byte journalID, ReplicationManager.ADD_OPERATION_TYPE operation, long txID, long id, byte recordType, EncodingSupport record) throws Exception
Exception
public void appendCommitRecord(byte journalID, long txID, boolean sync, boolean lineUp) throws Exception
Exception
public void appendDeleteRecordTransactional(byte journalID, long txID, long id, EncodingSupport record) throws Exception
Exception
public void appendDeleteRecordTransactional(byte journalID, long txID, long id) throws Exception
Exception
public void appendPrepareRecord(byte journalID, long txID, EncodingSupport transactionData) throws Exception
Exception
public void appendRollbackRecord(byte journalID, long txID) throws Exception
Exception
public void pageClosed(SimpleString storeName, int pageNumber)
storeName
- pageNumber
- public void pageDeleted(SimpleString storeName, int pageNumber)
public void pageWrite(PagedMessage message, int pageNumber)
public void largeMessageBegin(long messageId)
public void largeMessageDelete(Long messageId)
public void largeMessageWrite(long messageId, byte[] body)
public boolean isStarted()
isStarted
in interface HornetQComponent
public void start() throws HornetQException
start
in interface HornetQComponent
HornetQException
public void stop() throws Exception
stop
in interface HornetQComponent
Exception
public void clearReplicationTokens()
public Set<OperationContext> getActiveTokens()
public void syncJournalFile(JournalFile jf, JournalStorageManager.JournalContent content) throws Exception
HornetQException
Exception
public void syncLargeMessageFile(SequentialFile file, long size, long id) throws Exception
Exception
public void syncPages(SequentialFile file, long id, SimpleString queueName) throws Exception
Exception
public void sendStartSyncMessage(JournalFile[] datafiles, JournalStorageManager.JournalContent contentType, String nodeID, boolean allowsAutoFailBack) throws HornetQException
datafiles
- contentType
- HornetQException
public void sendSynchronizationDone(String nodeID)
nodeID
.nodeID
- public void sendLargeMessageIdListMessage(Map<Long,Pair<String,Long>> largeMessages)
largeMessages
- public OperationContext sendLiveIsStopping(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage)
public CoreRemotingConnection getBackupTransportConnection()
public boolean isSynchronizing()
Copyright © 2018 JBoss by Red Hat. All rights reserved.