Class JournalPersistenceAdapter
- java.lang.Object
-
- org.apache.activemq.store.journal.JournalPersistenceAdapter
-
- All Implemented Interfaces:
org.apache.activeio.journal.JournalEventListener,BrokerServiceAware,org.apache.activemq.Service,PersistenceAdapter,UsageListener
@Deprecated(forRemoval=true) public class JournalPersistenceAdapter extends Object implements PersistenceAdapter, org.apache.activeio.journal.JournalEventListener, UsageListener, BrokerServiceAware
Deprecated, for removal: This API element is subject to removal in a future version.- Deprecated for removal as this PersistenceAdapter is no longer used and replaced by the JDBCPersistenceAdapter.An implementation ofPersistenceAdapterdesigned for use with aJournaland then check pointing asynchronously on a timeout with some other long term persistent storage.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.activemq.thread.SchedulerschedulerDeprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
Constructors Constructor Description JournalPersistenceAdapter()Deprecated, for removal: This API element is subject to removal in a future version.JournalPersistenceAdapter(org.apache.activeio.journal.Journal journal, PersistenceAdapter longTermPersistence, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory)Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidallowIOResumption()Deprecated, for removal: This API element is subject to removal in a future version.voidbeginTransaction(ConnectionContext context)Deprecated, for removal: This API element is subject to removal in a future version.voidcheckpoint(boolean sync)Deprecated, for removal: This API element is subject to removal in a future version.voidcheckpoint(boolean sync, boolean fullCheckpoint)Deprecated, for removal: This API element is subject to removal in a future version.When we checkpoint we move all the journalled data to long term storage.voidcommitTransaction(ConnectionContext context)Deprecated, for removal: This API element is subject to removal in a future version.JobSchedulerStorecreateJobSchedulerStore()Deprecated, for removal: This API element is subject to removal in a future version.MessageStorecreateQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)Deprecated, for removal: This API element is subject to removal in a future version.protected IOExceptioncreateRecoveryFailedException(Exception e)Deprecated, for removal: This API element is subject to removal in a future version.TopicMessageStorecreateTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destinationName)Deprecated, for removal: This API element is subject to removal in a future version.TransactionStorecreateTransactionStore()Deprecated, for removal: This API element is subject to removal in a future version.protected IOExceptioncreateWriteException(String command, Exception e)Deprecated, for removal: This API element is subject to removal in a future version.protected IOExceptioncreateWriteException(org.apache.activemq.command.DataStructure packet, Exception e)Deprecated, for removal: This API element is subject to removal in a future version.voiddeleteAllMessages()Deprecated, for removal: This API element is subject to removal in a future version.booleandoCheckpoint()Deprecated, for removal: This API element is subject to removal in a future version.This does the actual checkpoint.longgetCheckpointInterval()Deprecated, for removal: This API element is subject to removal in a future version.Set<org.apache.activemq.command.ActiveMQDestination>getDestinations()Deprecated, for removal: This API element is subject to removal in a future version.FilegetDirectory()Deprecated, for removal: This API element is subject to removal in a future version.longgetLastMessageBrokerSequenceId()Deprecated, for removal: This API element is subject to removal in a future version.longgetLastProducerSequenceId(org.apache.activemq.command.ProducerId id)Deprecated, for removal: This API element is subject to removal in a future version.PersistenceAdaptergetLongTermPersistence()Deprecated, for removal: This API element is subject to removal in a future version.intgetMaxCheckpointMessageAddSize()Deprecated, for removal: This API element is subject to removal in a future version.intgetMaxCheckpointWorkers()Deprecated, for removal: This API element is subject to removal in a future version.JournalTransactionStoregetTransactionStore()Deprecated, for removal: This API element is subject to removal in a future version.SystemUsagegetUsageManager()Deprecated, for removal: This API element is subject to removal in a future version.org.apache.activemq.wireformat.WireFormatgetWireFormat()Deprecated, for removal: This API element is subject to removal in a future version.booleanisUseExternalMessageReferences()Deprecated, for removal: This API element is subject to removal in a future version.voidonUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage)Deprecated, for removal: This API element is subject to removal in a future version.voidoverflowNotification(org.apache.activeio.journal.RecordLocation safeLocation)Deprecated, for removal: This API element is subject to removal in a future version.The Journal give us a call back so that we can move old data out of the journal.org.apache.activemq.command.DataStructurereadCommand(org.apache.activeio.journal.RecordLocation location)Deprecated, for removal: This API element is subject to removal in a future version.voidremoveQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)Deprecated, for removal: This API element is subject to removal in a future version.Cleanup method to remove any state associated with the given destinationvoidremoveTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)Deprecated, for removal: This API element is subject to removal in a future version.Cleanup method to remove any state associated with the given destinationvoidrollbackTransaction(ConnectionContext context)Deprecated, for removal: This API element is subject to removal in a future version.voidsetBrokerName(String brokerName)Deprecated, for removal: This API element is subject to removal in a future version.voidsetBrokerService(BrokerService brokerService)Deprecated, for removal: This API element is subject to removal in a future version.voidsetCheckpointInterval(long checkpointInterval)Deprecated, for removal: This API element is subject to removal in a future version.voidsetDirectory(File dir)Deprecated, for removal: This API element is subject to removal in a future version.voidsetJournal(org.apache.activeio.journal.Journal journal)Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxCheckpointMessageAddSize(int maxCheckpointMessageAddSize)Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxCheckpointWorkers(int maxCheckpointWorkers)Deprecated, for removal: This API element is subject to removal in a future version.voidsetPersistenceAdapter(PersistenceAdapter longTermPersistence)Deprecated, for removal: This API element is subject to removal in a future version.voidsetTaskRunnerFactory(org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory)Deprecated, for removal: This API element is subject to removal in a future version.voidsetUsageManager(SystemUsage usageManager)Deprecated, for removal: This API element is subject to removal in a future version.voidsetUseExternalMessageReferences(boolean enable)Deprecated, for removal: This API element is subject to removal in a future version.longsize()Deprecated, for removal: This API element is subject to removal in a future version.voidstart()Deprecated, for removal: This API element is subject to removal in a future version.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.ByteSequencetoByteSequence(org.apache.activeio.packet.Packet packet)Deprecated, for removal: This API element is subject to removal in a future version.org.apache.activeio.packet.PackettoPacket(ByteSequence sequence)Deprecated, for removal: This API element is subject to removal in a future version.StringtoString()Deprecated, for removal: This API element is subject to removal in a future version.org.apache.activeio.journal.RecordLocationwriteCommand(org.apache.activemq.command.DataStructure command, boolean sync)Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Constructor Detail
-
JournalPersistenceAdapter
public JournalPersistenceAdapter()
Deprecated, for removal: This API element is subject to removal in a future version.
-
JournalPersistenceAdapter
public JournalPersistenceAdapter(org.apache.activeio.journal.Journal journal, PersistenceAdapter longTermPersistence, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory) throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
-
Method Detail
-
setTaskRunnerFactory
public void setTaskRunnerFactory(org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setJournal
public void setJournal(org.apache.activeio.journal.Journal journal)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setPersistenceAdapter
public void setPersistenceAdapter(PersistenceAdapter longTermPersistence)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setUsageManager
public void setUsageManager(SystemUsage usageManager)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setUsageManagerin interfacePersistenceAdapter- Parameters:
usageManager- The UsageManager that is controlling the destination's memory usage.
-
getDestinations
public Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDestinationsin interfacePersistenceAdapter
-
createQueueMessageStore
public MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createQueueMessageStorein interfacePersistenceAdapter- Throws:
IOException
-
createTopicMessageStore
public TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destinationName) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createTopicMessageStorein interfacePersistenceAdapter- Throws:
IOException
-
removeQueueMessageStore
public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
Deprecated, for removal: This API element is subject to removal in a future version.Cleanup method to remove any state associated with the given destination- Specified by:
removeQueueMessageStorein interfacePersistenceAdapter- Parameters:
destination- Destination to forget
-
removeTopicMessageStore
public void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
Deprecated, for removal: This API element is subject to removal in a future version.Cleanup method to remove any state associated with the given destination- Specified by:
removeTopicMessageStorein interfacePersistenceAdapter- Parameters:
destination- Destination to forget
-
createTransactionStore
public TransactionStore createTransactionStore() throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createTransactionStorein interfacePersistenceAdapter- Throws:
IOException
-
getLastMessageBrokerSequenceId
public long getLastMessageBrokerSequenceId() throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getLastMessageBrokerSequenceIdin interfacePersistenceAdapter- Throws:
IOException
-
beginTransaction
public void beginTransaction(ConnectionContext context) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
beginTransactionin interfacePersistenceAdapter- Throws:
IOException
-
commitTransaction
public void commitTransaction(ConnectionContext context) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
commitTransactionin interfacePersistenceAdapter- Throws:
IOException
-
rollbackTransaction
public void rollbackTransaction(ConnectionContext context) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
rollbackTransactionin interfacePersistenceAdapter- Throws:
IOException
-
start
public void start() throws ExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Specified by:
startin interfaceorg.apache.activemq.Service- Throws:
Exception
-
stop
public void stop() throws ExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Specified by:
stopin interfaceorg.apache.activemq.Service- Throws:
Exception
-
getLongTermPersistence
public PersistenceAdapter getLongTermPersistence()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getWireFormat
public org.apache.activemq.wireformat.WireFormat getWireFormat()
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- Returns the wireFormat.
-
overflowNotification
public void overflowNotification(org.apache.activeio.journal.RecordLocation safeLocation)
Deprecated, for removal: This API element is subject to removal in a future version.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.- Specified by:
overflowNotificationin interfaceorg.apache.activeio.journal.JournalEventListener- See Also:
org.apache.activemq.journal.JournalEventListener#overflowNotification(org.apache.activemq.journal.RecordLocation)
-
checkpoint
public void checkpoint(boolean sync, boolean fullCheckpoint)Deprecated, for removal: This API element is subject to removal in a future version.When we checkpoint we move all the journalled data to long term storage.
-
checkpoint
public void checkpoint(boolean sync)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
checkpointin interfacePersistenceAdapter
-
doCheckpoint
public boolean doCheckpoint()
Deprecated, for removal: This API element is subject to removal in a future version.This does the actual checkpoint.- Returns:
-
readCommand
public org.apache.activemq.command.DataStructure readCommand(org.apache.activeio.journal.RecordLocation location) throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Parameters:
location-- Returns:
- Throws:
IOException
-
createWriteException
protected IOException createWriteException(org.apache.activemq.command.DataStructure packet, Exception e)
Deprecated, for removal: This API element is subject to removal in a future version.
-
createWriteException
protected IOException createWriteException(String command, Exception e)
Deprecated, for removal: This API element is subject to removal in a future version.
-
createRecoveryFailedException
protected IOException createRecoveryFailedException(Exception e)
Deprecated, for removal: This API element is subject to removal in a future version.
-
writeCommand
public org.apache.activeio.journal.RecordLocation writeCommand(org.apache.activemq.command.DataStructure command, boolean sync) throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Parameters:
command-sync-- Returns:
- Throws:
IOException
-
onUsageChanged
public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
onUsageChangedin interfaceUsageListener
-
getTransactionStore
public JournalTransactionStore getTransactionStore()
Deprecated, for removal: This API element is subject to removal in a future version.
-
deleteAllMessages
public void deleteAllMessages() throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deleteAllMessagesin interfacePersistenceAdapter- Throws:
IOException
-
getUsageManager
public SystemUsage getUsageManager()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getMaxCheckpointMessageAddSize
public int getMaxCheckpointMessageAddSize()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setMaxCheckpointMessageAddSize
public void setMaxCheckpointMessageAddSize(int maxCheckpointMessageAddSize)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getMaxCheckpointWorkers
public int getMaxCheckpointWorkers()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setMaxCheckpointWorkers
public void setMaxCheckpointWorkers(int maxCheckpointWorkers)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getCheckpointInterval
public long getCheckpointInterval()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setCheckpointInterval
public void setCheckpointInterval(long checkpointInterval)
Deprecated, for removal: This API element is subject to removal in a future version.
-
isUseExternalMessageReferences
public boolean isUseExternalMessageReferences()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setUseExternalMessageReferences
public void setUseExternalMessageReferences(boolean enable)
Deprecated, for removal: This API element is subject to removal in a future version.
-
toPacket
public org.apache.activeio.packet.Packet toPacket(ByteSequence sequence)
Deprecated, for removal: This API element is subject to removal in a future version.
-
toByteSequence
public ByteSequence toByteSequence(org.apache.activeio.packet.Packet packet)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setBrokerName
public void setBrokerName(String brokerName)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setBrokerNamein interfacePersistenceAdapter
-
toString
public String toString()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setDirectory
public void setDirectory(File dir)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setDirectoryin interfacePersistenceAdapter
-
getDirectory
public File getDirectory()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDirectoryin interfacePersistenceAdapter
-
size
public long size()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
sizein interfacePersistenceAdapter
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setBrokerServicein interfaceBrokerServiceAware
-
getLastProducerSequenceId
public long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getLastProducerSequenceIdin interfacePersistenceAdapter
-
allowIOResumption
public void allowIOResumption()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
allowIOResumptionin interfacePersistenceAdapter
-
createJobSchedulerStore
public JobSchedulerStore createJobSchedulerStore() throws IOException, UnsupportedOperationException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createJobSchedulerStorein interfacePersistenceAdapter- Throws:
IOExceptionUnsupportedOperationException
-
-