Home » activemq-parent-5.3.1-source-release » org.apache » activemq » store » journal » [javadoc | source]
org.apache.activemq.store.journal
public class: JournalPersistenceAdapter [javadoc | source]
java.lang.Object
   org.apache.activemq.store.journal.JournalPersistenceAdapter

All Implemented Interfaces:
    BrokerServiceAware, PersistenceAdapter, org.apache.activeio.journal.JournalEventListener, UsageListener

An implementation of PersistenceAdapter designed for use with a Journal and then check pointing asynchronously on a timeout with some other long term persistent storage.
Field Summary
protected static final  Scheduler scheduler     
Constructor:
 public JournalPersistenceAdapter() 
 public JournalPersistenceAdapter(Journal journal,
    PersistenceAdapter longTermPersistence,
    TaskRunnerFactory taskRunnerFactory) throws IOException 
Method from org.apache.activemq.store.journal.JournalPersistenceAdapter Summary:
beginTransaction,   checkpoint,   checkpoint,   commitTransaction,   createPeriodicCheckpointTask,   createQueueMessageStore,   createRecoveryFailedException,   createTopicMessageStore,   createTransactionStore,   createWriteException,   createWriteException,   deleteAllMessages,   doCheckpoint,   getDestinations,   getLastMessageBrokerSequenceId,   getLongTermPersistence,   getMaxCheckpointMessageAddSize,   getMaxCheckpointWorkers,   getTransactionStore,   getUsageManager,   getWireFormat,   isUseExternalMessageReferences,   onUsageChanged,   overflowNotification,   readCommand,   removeQueueMessageStore,   removeTopicMessageStore,   rollbackTransaction,   setBrokerName,   setBrokerService,   setDirectory,   setJournal,   setMaxCheckpointMessageAddSize,   setMaxCheckpointWorkers,   setPersistenceAdapter,   setTaskRunnerFactory,   setUsageManager,   setUseExternalMessageReferences,   size,   start,   stop,   toByteSequence,   toPacket,   toString,   writeCommand
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.activemq.store.journal.JournalPersistenceAdapter Detail:
 public  void beginTransaction(ConnectionContext context) throws IOException 
 public  void checkpoint(boolean sync) 
 public  void checkpoint(boolean sync,
    boolean fullCheckpoint) 
    When we checkpoint we move all the journalled data to long term storage.
 public  void commitTransaction(ConnectionContext context) throws IOException 
 final Runnable createPeriodicCheckpointTask() 
 public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException 
 protected IOException createRecoveryFailedException(Exception e) 
 public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException 
 public TransactionStore createTransactionStore() throws IOException 
 protected IOException createWriteException(DataStructure packet,
    Exception e) 
 protected IOException createWriteException(String command,
    Exception e) 
 public  void deleteAllMessages() throws IOException 
 public boolean doCheckpoint() 
    This does the actual checkpoint.
 public Set<ActiveMQDestination> getDestinations() 
 public long getLastMessageBrokerSequenceId() throws IOException 
 public PersistenceAdapter getLongTermPersistence() 
 public int getMaxCheckpointMessageAddSize() 
 public int getMaxCheckpointWorkers() 
 public JournalTransactionStore getTransactionStore() 
 public SystemUsage getUsageManager() 
 public WireFormat getWireFormat() 
 public boolean isUseExternalMessageReferences() 
 public  void onUsageChanged(Usage usage,
    int oldPercentUsage,
    int newPercentUsage) 
 public  void overflowNotification(RecordLocation safeLocation) 
    The Journal give us a call back so that we can move old data out of the journal. Taking a checkpoint does this for us.
 public DataStructure readCommand(RecordLocation location) throws IOException 
 public  void removeQueueMessageStore(ActiveMQQueue destination) 
    Cleanup method to remove any state associated with the given destination
 public  void removeTopicMessageStore(ActiveMQTopic destination) 
    Cleanup method to remove any state associated with the given destination
 public  void rollbackTransaction(ConnectionContext context) throws IOException 
 public  void setBrokerName(String brokerName) 
 public  void setBrokerService(BrokerService brokerService) 
 public  void setDirectory(File dir) 
 public  void setJournal(Journal journal) 
 public  void setMaxCheckpointMessageAddSize(int maxCheckpointMessageAddSize) 
 public  void setMaxCheckpointWorkers(int maxCheckpointWorkers) 
 public  void setPersistenceAdapter(PersistenceAdapter longTermPersistence) 
 public  void setTaskRunnerFactory(TaskRunnerFactory taskRunnerFactory) 
 public  void setUsageManager(SystemUsage usageManager) 
 public  void setUseExternalMessageReferences(boolean enable) 
 public long size() 
 public synchronized  void start() throws Exception 
 public  void stop() throws Exception 
 public ByteSequence toByteSequence(Packet packet) 
 public Packet toPacket(ByteSequence sequence) 
 public String toString() 
 public RecordLocation writeCommand(DataStructure command,
    boolean sync) throws IOException