public class ReplicatedJournal extends Object implements Journal
JournalStorageManager
to replicate journal calls.JournalStorageManager
Constructor and Description |
---|
ReplicatedJournal(byte journaID,
Journal localJournal,
ReplicationManager replicationManager) |
Modifier and Type | Method and Description |
---|---|
void |
appendAddRecord(long id,
byte recordType,
byte[] record,
boolean sync) |
void |
appendAddRecord(long id,
byte recordType,
byte[] record,
boolean sync,
IOCompletion completionCallback) |
void |
appendAddRecord(long id,
byte recordType,
EncodingSupport record,
boolean sync) |
void |
appendAddRecord(long id,
byte recordType,
EncodingSupport record,
boolean sync,
IOCompletion completionCallback) |
void |
appendAddRecordTransactional(long txID,
long id,
byte recordType,
byte[] record) |
void |
appendAddRecordTransactional(long txID,
long id,
byte recordType,
EncodingSupport record) |
void |
appendCommitRecord(long txID,
boolean sync) |
void |
appendCommitRecord(long txID,
boolean sync,
IOCompletion callback) |
void |
appendCommitRecord(long txID,
boolean sync,
IOCompletion callback,
boolean lineUpContext) |
void |
appendDeleteRecord(long id,
boolean sync) |
void |
appendDeleteRecord(long id,
boolean sync,
IOCompletion completionCallback) |
void |
appendDeleteRecordTransactional(long txID,
long id) |
void |
appendDeleteRecordTransactional(long txID,
long id,
byte[] record) |
void |
appendDeleteRecordTransactional(long txID,
long id,
EncodingSupport record) |
void |
appendPrepareRecord(long txID,
byte[] transactionData,
boolean sync) |
void |
appendPrepareRecord(long txID,
byte[] transactionData,
boolean sync,
IOCompletion callback) |
void |
appendPrepareRecord(long txID,
EncodingSupport transactionData,
boolean sync)
If the system crashed after a prepare was called, it should store information that is required to bring the transaction
back to a state it could be committed.
|
void |
appendPrepareRecord(long txID,
EncodingSupport transactionData,
boolean sync,
IOCompletion callback) |
void |
appendRollbackRecord(long txID,
boolean sync) |
void |
appendRollbackRecord(long txID,
boolean sync,
IOCompletion callback) |
void |
appendUpdateRecord(long id,
byte recordType,
byte[] record,
boolean sync) |
void |
appendUpdateRecord(long id,
byte recordType,
byte[] record,
boolean sync,
IOCompletion completionCallback) |
void |
appendUpdateRecord(long id,
byte recordType,
EncodingSupport record,
boolean sync) |
void |
appendUpdateRecord(long id,
byte recordType,
EncodingSupport record,
boolean sync,
IOCompletion completionCallback) |
void |
appendUpdateRecordTransactional(long txID,
long id,
byte recordType,
byte[] record) |
void |
appendUpdateRecordTransactional(long txID,
long id,
byte recordType,
EncodingSupport record) |
int |
getAlignment() |
int |
getNumberOfRecords() |
int |
getUserVersion() |
boolean |
isStarted() |
void |
lineUpContex(IOCompletion callback) |
JournalLoadInformation |
load(List<RecordInfo> committedRecords,
List<PreparedTransactionInfo> preparedTransactions,
TransactionFailureCallback transactionFailure) |
JournalLoadInformation |
load(LoaderCallback reloadManager) |
JournalLoadInformation |
loadInternalOnly()
Load internal data structures and not expose any data.
|
void |
perfBlast(int pages) |
void |
runDirectJournalBlast() |
void |
start() |
void |
stop() |
public ReplicatedJournal(byte journaID, Journal localJournal, ReplicationManager replicationManager)
public void appendAddRecord(long id, byte recordType, byte[] record, boolean sync) throws Exception
appendAddRecord
in interface Journal
id
- recordType
- record
- sync
- Exception
Journal.appendAddRecord(long, byte, byte[], boolean)
public void appendAddRecord(long id, byte recordType, EncodingSupport record, boolean sync) throws Exception
appendAddRecord
in interface Journal
Exception
public void appendAddRecord(long id, byte recordType, byte[] record, boolean sync, IOCompletion completionCallback) throws Exception
appendAddRecord
in interface Journal
Exception
public void appendAddRecord(long id, byte recordType, EncodingSupport record, boolean sync, IOCompletion completionCallback) throws Exception
appendAddRecord
in interface Journal
id
- recordType
- record
- sync
- Exception
Journal.appendAddRecord(long, byte, org.hornetq.core.journal.EncodingSupport, boolean)
public void appendAddRecordTransactional(long txID, long id, byte recordType, byte[] record) throws Exception
appendAddRecordTransactional
in interface Journal
txID
- id
- recordType
- record
- Exception
Journal.appendAddRecordTransactional(long, long, byte, byte[])
public void appendAddRecordTransactional(long txID, long id, byte recordType, EncodingSupport record) throws Exception
appendAddRecordTransactional
in interface Journal
txID
- id
- recordType
- record
- Exception
Journal.appendAddRecordTransactional(long, long, byte, org.hornetq.core.journal.EncodingSupport)
public void appendCommitRecord(long txID, boolean sync) throws Exception
appendCommitRecord
in interface Journal
txID
- sync
- Exception
Journal.appendCommitRecord(long, boolean)
public void appendCommitRecord(long txID, boolean sync, IOCompletion callback) throws Exception
appendCommitRecord
in interface Journal
Exception
public void appendCommitRecord(long txID, boolean sync, IOCompletion callback, boolean lineUpContext) throws Exception
appendCommitRecord
in interface Journal
Exception
public void appendDeleteRecord(long id, boolean sync) throws Exception
appendDeleteRecord
in interface Journal
id
- sync
- Exception
Journal.appendDeleteRecord(long, boolean)
public void appendDeleteRecord(long id, boolean sync, IOCompletion completionCallback) throws Exception
appendDeleteRecord
in interface Journal
Exception
public void appendDeleteRecordTransactional(long txID, long id, byte[] record) throws Exception
appendDeleteRecordTransactional
in interface Journal
txID
- id
- record
- Exception
Journal.appendDeleteRecordTransactional(long, long, byte[])
public void appendDeleteRecordTransactional(long txID, long id, EncodingSupport record) throws Exception
appendDeleteRecordTransactional
in interface Journal
txID
- id
- record
- Exception
Journal.appendDeleteRecordTransactional(long, long, org.hornetq.core.journal.EncodingSupport)
public void appendDeleteRecordTransactional(long txID, long id) throws Exception
appendDeleteRecordTransactional
in interface Journal
txID
- id
- Exception
Journal.appendDeleteRecordTransactional(long, long)
public void appendPrepareRecord(long txID, byte[] transactionData, boolean sync) throws Exception
appendPrepareRecord
in interface Journal
txID
- transactionData
- sync
- Exception
Journal.appendPrepareRecord(long, byte[], boolean)
public void appendPrepareRecord(long txID, EncodingSupport transactionData, boolean sync) throws Exception
Journal
If the system crashed after a prepare was called, it should store information that is required to bring the transaction back to a state it could be committed.
transactionData allows you to store any other supporting user-data related to the transaction
appendPrepareRecord
in interface Journal
txID
- transactionData
- sync
- Exception
Journal.appendPrepareRecord(long, org.hornetq.core.journal.EncodingSupport, boolean)
public void appendPrepareRecord(long txID, EncodingSupport transactionData, boolean sync, IOCompletion callback) throws Exception
appendPrepareRecord
in interface Journal
Exception
public void appendPrepareRecord(long txID, byte[] transactionData, boolean sync, IOCompletion callback) throws Exception
appendPrepareRecord
in interface Journal
Exception
public void appendRollbackRecord(long txID, boolean sync) throws Exception
appendRollbackRecord
in interface Journal
txID
- sync
- Exception
Journal.appendRollbackRecord(long, boolean)
public void appendRollbackRecord(long txID, boolean sync, IOCompletion callback) throws Exception
appendRollbackRecord
in interface Journal
Exception
public void appendUpdateRecord(long id, byte recordType, byte[] record, boolean sync) throws Exception
appendUpdateRecord
in interface Journal
id
- recordType
- record
- sync
- Exception
Journal.appendUpdateRecord(long, byte, byte[], boolean)
public void appendUpdateRecord(long id, byte recordType, EncodingSupport record, boolean sync) throws Exception
appendUpdateRecord
in interface Journal
id
- recordType
- record
- sync
- Exception
Journal.appendUpdateRecord(long, byte, org.hornetq.core.journal.EncodingSupport, boolean)
public void appendUpdateRecord(long id, byte recordType, byte[] record, boolean sync, IOCompletion completionCallback) throws Exception
appendUpdateRecord
in interface Journal
Exception
public void appendUpdateRecord(long id, byte recordType, EncodingSupport record, boolean sync, IOCompletion completionCallback) throws Exception
appendUpdateRecord
in interface Journal
Exception
public void appendUpdateRecordTransactional(long txID, long id, byte recordType, byte[] record) throws Exception
appendUpdateRecordTransactional
in interface Journal
txID
- id
- recordType
- record
- Exception
Journal.appendUpdateRecordTransactional(long, long, byte, byte[])
public void appendUpdateRecordTransactional(long txID, long id, byte recordType, EncodingSupport record) throws Exception
appendUpdateRecordTransactional
in interface Journal
txID
- id
- recordType
- record
- Exception
Journal.appendUpdateRecordTransactional(long, long, byte, org.hornetq.core.journal.EncodingSupport)
public JournalLoadInformation load(List<RecordInfo> committedRecords, List<PreparedTransactionInfo> preparedTransactions, TransactionFailureCallback transactionFailure) throws Exception
load
in interface Journal
committedRecords
- preparedTransactions
- transactionFailure
- Exception
Journal.load(java.util.List, java.util.List, org.hornetq.core.journal.TransactionFailureCallback)
public JournalLoadInformation load(LoaderCallback reloadManager) throws Exception
load
in interface Journal
reloadManager
- Exception
Journal.load(org.hornetq.core.journal.LoaderCallback)
public void perfBlast(int pages) throws Exception
perfBlast
in interface Journal
pages
- Exception
Journal.perfBlast(int)
public void start() throws Exception
start
in interface HornetQComponent
Exception
HornetQComponent.start()
public void stop() throws Exception
stop
in interface HornetQComponent
Exception
HornetQComponent.stop()
public int getAlignment() throws Exception
getAlignment
in interface Journal
Exception
public boolean isStarted()
isStarted
in interface HornetQComponent
public JournalLoadInformation loadInternalOnly() throws Exception
Journal
loadInternalOnly
in interface Journal
Exception
public int getNumberOfRecords()
getNumberOfRecords
in interface Journal
public void runDirectJournalBlast() throws Exception
runDirectJournalBlast
in interface Journal
Exception
public int getUserVersion()
getUserVersion
in interface Journal
public void lineUpContex(IOCompletion callback)
lineUpContex
in interface Journal
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.