|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.activemq.store.journal.JournalPersistenceAdapter
An implementation of PersistenceAdapter designed for
use with a Journal and then checkpointing asynchronously
on a timeout with some other long term persistent storage.
| Field Summary | |
static java.lang.String |
DEFAULT_JOURNAL_TYPE
|
static java.lang.String |
HOWL_JOURNAL_TYPE
|
| Constructor Summary | |
JournalPersistenceAdapter()
|
|
JournalPersistenceAdapter(java.io.File directory,
PersistenceAdapter longTermPersistence)
|
|
| Method Summary | |
void |
beginTransaction()
This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimisation. |
void |
checkpoint(boolean sync)
When we checkpoint we move all the journaled data to long term storage. |
void |
commitTransaction()
Commit a persistence transaction |
protected org.activeio.journal.Journal |
createJournal()
|
MessageStore |
createQueueMessageStore(java.lang.String destinationName)
Factory method to create a new queue message store with the given destination name |
protected javax.jms.JMSException |
createRecoveryFailedException(java.lang.Exception e)
|
TopicMessageStore |
createTopicMessageStore(java.lang.String destinationName)
Factory method to create a new topic message store with the given destination name |
TransactionStore |
createTransactionStore()
Factory method to create a new persistent prepared transaction store for XA recovery |
protected javax.jms.JMSException |
createWriteException(Packet packet,
java.lang.Exception e)
|
protected javax.jms.JMSException |
createWriteException(java.lang.String command,
java.lang.Exception e)
|
long |
getCheckpointInterval()
|
EDU.oswego.cs.dl.util.concurrent.ClockDaemon |
getClockDaemon()
|
java.io.File |
getDirectory()
|
java.util.Map |
getInitialDestinations()
Returns a map, indexed by String name, of all the Destination
objects active on startup. |
java.lang.String |
getJournalType()
|
int |
getLogFileCount()
|
int |
getLogFileSize()
|
PersistenceAdapter |
getLongTermPersistence()
|
JournalTransactionStore |
getTransactionStore()
|
WireFormat |
getWireFormat()
|
void |
overflowNotification(org.activeio.journal.RecordLocation safeLocation)
The Journal give us a call back so that we can move old data out of the journal. |
Packet |
readPacket(org.activeio.journal.RecordLocation location)
|
void |
rollbackTransaction()
Rollback a persistence transaction |
void |
setCheckpointInterval(long checkpointInterval)
|
void |
setClockDaemon(EDU.oswego.cs.dl.util.concurrent.ClockDaemon clockDaemon)
|
void |
setDirectory(java.io.File directory)
|
void |
setJournalType(java.lang.String journalType)
|
void |
setLogFileCount(int logFileCount)
|
void |
setLogFileSize(int logFileSize)
|
void |
setLongTermPersistence(PersistenceAdapter longTermPersistence)
|
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
org.activeio.journal.RecordLocation |
writeCommand(java.lang.String command,
boolean sync)
|
org.activeio.journal.RecordLocation |
writePacket(java.lang.String destination,
Packet packet,
boolean sync)
|
org.activeio.journal.RecordLocation |
writePacket(java.lang.String destinationName,
java.lang.String subscription,
MessageIdentity messageIdentity,
boolean sync)
|
org.activeio.journal.RecordLocation |
writeTxCommand(TxCommand command,
boolean sync)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_JOURNAL_TYPE
public static final java.lang.String HOWL_JOURNAL_TYPE
| Constructor Detail |
public JournalPersistenceAdapter()
public JournalPersistenceAdapter(java.io.File directory,
PersistenceAdapter longTermPersistence)
throws java.io.IOException
| Method Detail |
public java.util.Map getInitialDestinations()
PersistenceAdapterDestination
objects active on startup.
getInitialDestinations in interface PersistenceAdapter
public MessageStore createQueueMessageStore(java.lang.String destinationName)
throws javax.jms.JMSException
PersistenceAdapter
createQueueMessageStore in interface PersistenceAdapterjavax.jms.JMSException
public TopicMessageStore createTopicMessageStore(java.lang.String destinationName)
throws javax.jms.JMSException
PersistenceAdapter
createTopicMessageStore in interface PersistenceAdapterjavax.jms.JMSException
public TransactionStore createTransactionStore()
throws javax.jms.JMSException
PersistenceAdapter
createTransactionStore in interface PersistenceAdapterjavax.jms.JMSException
public void beginTransaction()
throws javax.jms.JMSException
PersistenceAdapter
beginTransaction in interface PersistenceAdapterjavax.jms.JMSException
public void commitTransaction()
throws javax.jms.JMSException
PersistenceAdapter
commitTransaction in interface PersistenceAdapterjavax.jms.JMSExceptionPersistenceAdapter.beginTransaction()public void rollbackTransaction()
PersistenceAdapter
rollbackTransaction in interface PersistenceAdapterPersistenceAdapter.beginTransaction()
public void start()
throws javax.jms.JMSException
Service
start in interface Servicejavax.jms.JMSException
public void stop()
throws javax.jms.JMSException
Service
stop in interface Servicejavax.jms.JMSExceptionpublic PersistenceAdapter getLongTermPersistence()
public void setLongTermPersistence(PersistenceAdapter longTermPersistence)
public java.io.File getDirectory()
public void setDirectory(java.io.File directory)
directory - The directory to set.public WireFormat getWireFormat()
public java.lang.String getJournalType()
public void setJournalType(java.lang.String journalType)
protected org.activeio.journal.Journal createJournal()
throws java.io.IOException
java.io.IOExceptionpublic void overflowNotification(org.activeio.journal.RecordLocation safeLocation)
overflowNotification in interface org.activeio.journal.JournalEventListenerorg.activemq.journal.JournalEventListener#overflowNotification(org.activemq.journal.RecordLocation)public void checkpoint(boolean sync)
public org.activeio.journal.RecordLocation writePacket(java.lang.String destination,
Packet packet,
boolean sync)
throws javax.jms.JMSException
sync -
javax.jms.JMSException
public org.activeio.journal.RecordLocation writeCommand(java.lang.String command,
boolean sync)
throws javax.jms.JMSException
sync -
javax.jms.JMSException
public Packet readPacket(org.activeio.journal.RecordLocation location)
throws javax.jms.JMSException
location -
javax.jms.JMSException
protected javax.jms.JMSException createWriteException(Packet packet,
java.lang.Exception e)
protected javax.jms.JMSException createWriteException(java.lang.String command,
java.lang.Exception e)
protected javax.jms.JMSException createRecoveryFailedException(java.lang.Exception e)
public EDU.oswego.cs.dl.util.concurrent.ClockDaemon getClockDaemon()
public void setClockDaemon(EDU.oswego.cs.dl.util.concurrent.ClockDaemon clockDaemon)
public org.activeio.journal.RecordLocation writeTxCommand(TxCommand command,
boolean sync)
throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
public org.activeio.journal.RecordLocation writePacket(java.lang.String destinationName,
java.lang.String subscription,
MessageIdentity messageIdentity,
boolean sync)
throws javax.jms.JMSException
destinationName - messageIdentity -
javax.jms.JMSExceptionpublic JournalTransactionStore getTransactionStore()
public int getLogFileCount()
public void setLogFileCount(int logFileCount)
public int getLogFileSize()
public void setLogFileSize(int logFileSize)
public long getCheckpointInterval()
public void setCheckpointInterval(long checkpointInterval)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||