Class JournalTransactionStore
- java.lang.Object
-
- org.apache.activemq.store.journal.JournalTransactionStore
-
- All Implemented Interfaces:
Service
,TransactionStore
public class JournalTransactionStore extends Object implements TransactionStore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JournalTransactionStore.Tx
Operationsstatic class
JournalTransactionStore.TxOperation
-
Constructor Summary
Constructors Constructor Description JournalTransactionStore(JournalPersistenceAdapter adapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acknowledge(JournalTopicMessageStore store, JournalTopicAck ack, org.apache.activeio.journal.RecordLocation location)
org.apache.activeio.journal.RecordLocation
checkpoint()
void
commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit)
JournalTransactionStore.Tx
getTx(Object txid, org.apache.activeio.journal.RecordLocation location)
boolean
isDoingRecover()
void
prepare(TransactionId txid)
void
recover(TransactionRecoveryListener listener)
void
removeMessage(JournalMessageStore store, MessageAck ack, org.apache.activeio.journal.RecordLocation location)
JournalTransactionStore.Tx
replayCommit(TransactionId txid, boolean wasPrepared)
void
replayPrepare(TransactionId txid)
void
replayRollback(TransactionId txid)
void
rollback(TransactionId txid)
void
start()
void
stop()
-
-
-
Constructor Detail
-
JournalTransactionStore
public JournalTransactionStore(JournalPersistenceAdapter adapter)
-
-
Method Detail
-
prepare
public void prepare(TransactionId txid) throws IOException
- Specified by:
prepare
in interfaceTransactionStore
- Throws:
IOException
- See Also:
TransactionStore.prepare(TransactionId)
-
replayPrepare
public void replayPrepare(TransactionId txid) throws IOException
- Throws:
IOException
- See Also:
TransactionStore.prepare(TransactionId)
-
getTx
public JournalTransactionStore.Tx getTx(Object txid, org.apache.activeio.journal.RecordLocation location)
-
commit
public void commit(TransactionId txid, boolean wasPrepared, Runnable preCommit, Runnable postCommit) throws IOException
- Specified by:
commit
in interfaceTransactionStore
- Throws:
XAException
IOException
- See Also:
org.apache.activemq.store.TransactionStore#commit(org.apache.activemq.service.Transaction)
-
replayCommit
public JournalTransactionStore.Tx replayCommit(TransactionId txid, boolean wasPrepared) throws IOException
- Throws:
XAException
IOException
- See Also:
org.apache.activemq.store.TransactionStore#commit(org.apache.activemq.service.Transaction)
-
rollback
public void rollback(TransactionId txid) throws IOException
- Specified by:
rollback
in interfaceTransactionStore
- Throws:
IOException
- See Also:
TransactionStore.rollback(TransactionId)
-
replayRollback
public void replayRollback(TransactionId txid) throws IOException
- Throws:
IOException
- See Also:
TransactionStore.rollback(TransactionId)
-
start
public void start() throws Exception
-
recover
public void recover(TransactionRecoveryListener listener) throws IOException
- Specified by:
recover
in interfaceTransactionStore
- Throws:
IOException
-
removeMessage
public void removeMessage(JournalMessageStore store, MessageAck ack, org.apache.activeio.journal.RecordLocation location) throws IOException
- Parameters:
ack
-- Throws:
IOException
-
acknowledge
public void acknowledge(JournalTopicMessageStore store, JournalTopicAck ack, org.apache.activeio.journal.RecordLocation location)
-
checkpoint
public org.apache.activeio.journal.RecordLocation checkpoint() throws IOException
- Throws:
IOException
-
isDoingRecover
public boolean isDoingRecover()
-
-