Class NullStorageManager
- java.lang.Object
-
- org.apache.activemq.artemis.core.persistence.impl.nullpm.NullStorageManager
-
- All Implemented Interfaces:
StorageManager,ActiveMQComponent,IDGenerator
public class NullStorageManager extends Object implements StorageManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.core.persistence.StorageManager
StorageManager.LargeMessageExtension
-
-
Constructor Summary
Constructors Constructor Description NullStorageManager()NullStorageManager(int nextId)NullStorageManager(IOCriticalErrorListener ioCriticalErrorListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAddressBinding(long tx, AddressInfo addressInfo)voidaddBytesToLargeMessage(SequentialFile appendFile, long messageID, byte[] bytes)voidaddBytesToLargeMessage(SequentialFile file, long messageId, ActiveMQBuffer bytes)voidaddGrouping(GroupBinding groupBinding)voidaddQueueBinding(long tx, Binding binding)booleanaddToPage(PagingStore store, Message msg, Transaction tx, RouteContextList listCtx)Write message to page if we are paging.voidafterCompleteOperations(IOCallback run)voidafterStoreOperations(IOCallback run)This is similar to afterComplete, however this only cares about the journal part.ByteBufferallocateDirectBuffer(int size)AIO has an optimized buffer which has a method to release it instead of the way NIO will release data based on GC.voidclearContext()ArtemisCloseablecloseableReadLock()Read lock the StorageManager.voidcommit(long txID)voidcommit(long txID, boolean lineUpContext)voidcommitBindings(long txID)voidconfirmPendingLargeMessage(long recordID)Confirms that a large message was finishedvoidconfirmPendingLargeMessageTX(Transaction transaction, long messageID, long recordID)Confirms that a large message was finishedSequentialFilecreateFileForLargeMessage(long messageID, StorageManager.LargeMessageExtension extension)Instantiates a SequentialFile to be used for storing aLargeServerMessage.LargeServerMessagecreateLargeMessage()LargeServerMessagecreateLargeMessage(long id, Message message)Creates a new LargeMessage with the given id.voidcriticalError(Throwable error)voiddeleteAddressBinding(long tx, long addressBindingID)voiddeleteAddressSetting(SimpleString addressMatch)voiddeleteAddressStatus(long recordID)voiddeleteBridgeConfiguration(String bridgeName)voiddeleteConnector(String connectorName)voiddeleteCursorAcknowledge(long ackID)voiddeleteCursorAcknowledgeTransactional(long txID, long ackID)voiddeleteDivertConfiguration(String divertName)voiddeleteDuplicateID(long recordID)voiddeleteDuplicateIDTransactional(long txID, long recordID)voiddeleteGrouping(long tx, GroupBinding groupBinding)voiddeleteHeuristicCompletion(long txID)voiddeleteID(long journalD)voiddeleteIncrementRecord(long txID, long recordID)voiddeleteKeyValuePair(String mapId, String key)voiddeleteLargeMessageBody(LargeServerMessage largeServerMessage)voiddeleteMessage(long messageID)voiddeletePageComplete(long ackID)voiddeletePageCounter(long txID, long recordID)voiddeletePageTransactional(long recordID)voiddeletePendingPageCounter(long txID, long recordID)voiddeleteQueueBinding(long tx, long queueBindingID)voiddeleteQueueStatus(long recordID)voiddeleteRole(String role)voiddeleteSecuritySetting(SimpleString addressMatch)voiddeleteUser(String username)voidfreeDirectBuffer(ByteBuffer buffer)AIO has an optimized buffer which has a method to release it instead of the way NIO will release data based on GC.longgenerateID()JournalgetBindingsJournal()OperationContextgetContext()Get the context associated with the thread for later reuselonggetCurrentID()JournalgetMessageJournal()Map<String,PersistedKeyValuePair>getPersistedKeyValuePairs(String mapId)Map<String,PersistedRole>getPersistedRoles()Map<String,PersistedUser>getPersistedUsers()voidinjectMonitor(FileStoreMonitor monitor)booleanisStarted()voidlargeMessageClosed(LargeServerMessage largeServerMessage)LargeServerMessagelargeMessageCreated(long id, LargeServerMessage largeMessage)voidlineUpContext()JournalLoadInformationloadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos, List<AddressBindingInfo> addressBindingInfos)JournalLoadInformationloadMessageJournal(PostOffice postOffice, PagingManager pagingManager, ResourceManager resourceManager, Map<Long,QueueBindingInfo> queueInfos, Map<SimpleString,List<Pair<byte[],Long>>> duplicateIDMap, Set<Pair<Long,Long>> pendingLargeMessages, Set<Long> storedLargeMessages, List<PageCountPending> pendingNonTXPageCounter, JournalLoader journalLoader)OperationContextnewContext(Executor executor)It just creates an OperationContext without associating itOperationContextnewSingleThreadContext()voidpageClosed(SimpleString storeName, long pageNumber)voidpageDeleted(SimpleString storeName, long pageNumber)voidpageWrite(PagedMessage message, long pageNumber)voidpersistIdGenerator()Closes theIDGeneratorpersisting the current record ID.voidprepare(long txID, Xid xid)List<PersistedAddressSetting>recoverAddressSettings()List<PersistedBridgeConfiguration>recoverBridgeConfigurations()List<PersistedConnector>recoverConnectors()List<PersistedDivertConfiguration>recoverDivertConfigurations()List<PersistedSecuritySetting>recoverSecuritySettings()voidrollback(long txID)voidrollbackBindings(long txID)voidsetContext(OperationContext context)Set the context back to the threadprotected voidsetNextId(long id)voidstart()voidstartReplication(ReplicationManager replicationManager, PagingManager pagingManager, String nodeID, boolean autoFailBack, long initialReplicationSyncTimeout)voidstop()voidstop(boolean ioCriticalError, boolean sendFailover)voidstopReplication()Stops the replication of data from the live to the backup.voidstoreAcknowledge(long queueID, long messageID)voidstoreAcknowledgeTransactional(long txID, long queueID, long messageiD)voidstoreAddressSetting(PersistedAddressSetting addressSetting)longstoreAddressStatus(long addressID, AddressQueueStatus status)voidstoreBridgeConfiguration(PersistedBridgeConfiguration persistedBridgeConfiguration)voidstoreConnector(PersistedConnector persistedConnector)voidstoreCursorAcknowledge(long queueID, PagePosition position)voidstoreCursorAcknowledgeTransactional(long txID, long queueID, PagePosition position)voidstoreDivertConfiguration(PersistedDivertConfiguration persistedDivertConfiguration)voidstoreDuplicateID(SimpleString address, byte[] duplID, long recordID)voidstoreDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID)longstoreHeuristicCompletion(Xid xid, boolean isCommit)voidstoreID(long journalID, long id)Stores the id from IDManager.voidstoreKeyValuePair(PersistedKeyValuePair persistedKeyValuePair)voidstoreMessage(Message message)voidstoreMessageTransactional(long txID, Message message)voidstorePageCompleteTransactional(long txID, long queueID, PagePosition position)longstorePageCounter(long txID, long queueID, long value, long size)longstorePageCounterInc(long queueID, int add, long size)longstorePageCounterInc(long txID, long queueID, int add, long size)voidstorePageTransaction(long txID, PageTransactionInfo pageTransaction)longstorePendingCounter(long queueID, long pageID)longstoreQueueStatus(long queueID, AddressQueueStatus status)voidstoreReference(long queueID, long messageID, boolean last)voidstoreReferenceTransactional(long txID, long queueID, long messageID)voidstoreRole(PersistedRole persistedRole)voidstoreSecuritySetting(PersistedSecuritySetting persistedRoles)voidstoreUser(PersistedUser persistedUser)voidupdateDeliveryCount(MessageReference ref)voidupdateDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID)voidupdatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depage)voidupdateQueueBinding(long tx, Binding binding)voidupdateScheduledDeliveryTime(MessageReference ref)voidupdateScheduledDeliveryTimeTransactional(long txID, MessageReference ref)voidwaitOnOperations()Block until the operations are done.booleanwaitOnOperations(long timeout)Block until the operations are done.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop
-
Methods inherited from interface org.apache.activemq.artemis.core.persistence.StorageManager
createFileForLargeMessage, getJournalSequentialFileFactory, getMaxRecordSize, loadMessageJournal, recoverLargeMessagesOnFolder
-
-
-
-
Constructor Detail
-
NullStorageManager
public NullStorageManager(IOCriticalErrorListener ioCriticalErrorListener)
-
NullStorageManager
public NullStorageManager()
-
NullStorageManager
public NullStorageManager(int nextId)
-
-
Method Detail
-
closeableReadLock
public ArtemisCloseable closeableReadLock()
Description copied from interface:StorageManagerRead lock the StorageManager. USE WITH CARE!The main lock is used to write lock the whole manager when starting replication. Sub-systems, say Paging classes, that use locks of their own AND also write through the StorageManager MUST first read lock the storageManager before taking their own locks. Otherwise, we may dead-lock when starting replication sync.
- Specified by:
closeableReadLockin interfaceStorageManager
-
setNextId
protected void setNextId(long id)
-
criticalError
public void criticalError(Throwable error)
- Specified by:
criticalErrorin interfaceStorageManager
-
storeQueueStatus
public long storeQueueStatus(long queueID, AddressQueueStatus status) throws Exception- Specified by:
storeQueueStatusin interfaceStorageManager- Parameters:
queueID- The id of the queuestatus- The current status of the queue. (Reserved for future use, ATM we only use this record for PAUSED)- Returns:
- the id of the journal
- Throws:
Exception
-
updateQueueBinding
public void updateQueueBinding(long tx, Binding binding) throws Exception- Specified by:
updateQueueBindingin interfaceStorageManager- Throws:
Exception
-
deleteQueueStatus
public void deleteQueueStatus(long recordID) throws Exception- Specified by:
deleteQueueStatusin interfaceStorageManager- Throws:
Exception
-
storeAddressStatus
public long storeAddressStatus(long addressID, AddressQueueStatus status) throws Exception- Specified by:
storeAddressStatusin interfaceStorageManager- Throws:
Exception
-
deleteAddressStatus
public void deleteAddressStatus(long recordID) throws Exception- Specified by:
deleteAddressStatusin interfaceStorageManager- Throws:
Exception
-
injectMonitor
public void injectMonitor(FileStoreMonitor monitor) throws Exception
- Specified by:
injectMonitorin interfaceStorageManager- Throws:
Exception
-
deleteQueueBinding
public void deleteQueueBinding(long tx, long queueBindingID) throws Exception- Specified by:
deleteQueueBindingin interfaceStorageManager- Throws:
Exception
-
addAddressBinding
public void addAddressBinding(long tx, AddressInfo addressInfo) throws Exception- Specified by:
addAddressBindingin interfaceStorageManager- Throws:
Exception
-
deleteAddressBinding
public void deleteAddressBinding(long tx, long addressBindingID) throws Exception- Specified by:
deleteAddressBindingin interfaceStorageManager- Throws:
Exception
-
commit
public void commit(long txID) throws Exception- Specified by:
commitin interfaceStorageManager- Throws:
Exception
-
loadBindingJournal
public JournalLoadInformation loadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos, List<AddressBindingInfo> addressBindingInfos) throws Exception
- Specified by:
loadBindingJournalin interfaceStorageManager- Throws:
Exception
-
prepare
public void prepare(long txID, Xid xid) throws Exception- Specified by:
preparein interfaceStorageManager- Throws:
Exception
-
rollback
public void rollback(long txID) throws Exception- Specified by:
rollbackin interfaceStorageManager- Throws:
Exception
-
rollbackBindings
public void rollbackBindings(long txID) throws Exception- Specified by:
rollbackBindingsin interfaceStorageManager- Throws:
Exception
-
commitBindings
public void commitBindings(long txID) throws Exception- Specified by:
commitBindingsin interfaceStorageManager- Throws:
Exception
-
storeReference
public void storeReference(long queueID, long messageID, boolean last) throws Exception- Specified by:
storeReferencein interfaceStorageManager- Throws:
Exception
-
storeReferenceTransactional
public void storeReferenceTransactional(long txID, long queueID, long messageID) throws Exception- Specified by:
storeReferenceTransactionalin interfaceStorageManager- Throws:
Exception
-
storeAcknowledge
public void storeAcknowledge(long queueID, long messageID) throws Exception- Specified by:
storeAcknowledgein interfaceStorageManager- Throws:
Exception
-
storeAcknowledgeTransactional
public void storeAcknowledgeTransactional(long txID, long queueID, long messageiD) throws Exception- Specified by:
storeAcknowledgeTransactionalin interfaceStorageManager- Throws:
Exception
-
deleteMessage
public void deleteMessage(long messageID) throws Exception- Specified by:
deleteMessagein interfaceStorageManager- Throws:
Exception
-
storeMessage
public void storeMessage(Message message) throws Exception
- Specified by:
storeMessagein interfaceStorageManager- Throws:
Exception
-
storeMessageTransactional
public void storeMessageTransactional(long txID, Message message) throws Exception- Specified by:
storeMessageTransactionalin interfaceStorageManager- Throws:
Exception
-
updateScheduledDeliveryTime
public void updateScheduledDeliveryTime(MessageReference ref) throws Exception
- Specified by:
updateScheduledDeliveryTimein interfaceStorageManager- Throws:
Exception
-
updateScheduledDeliveryTimeTransactional
public void updateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) throws Exception- Specified by:
updateScheduledDeliveryTimeTransactionalin interfaceStorageManager- Throws:
Exception
-
storePageTransaction
public void storePageTransaction(long txID, PageTransactionInfo pageTransaction) throws Exception- Specified by:
storePageTransactionin interfaceStorageManager- Throws:
Exception
-
updateDeliveryCount
public void updateDeliveryCount(MessageReference ref) throws Exception
- Specified by:
updateDeliveryCountin interfaceStorageManager- Throws:
Exception
-
storeDuplicateID
public void storeDuplicateID(SimpleString address, byte[] duplID, long recordID) throws Exception
- Specified by:
storeDuplicateIDin interfaceStorageManager- Throws:
Exception
-
storeDuplicateIDTransactional
public void storeDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID) throws Exception- Specified by:
storeDuplicateIDTransactionalin interfaceStorageManager- Throws:
Exception
-
updateDuplicateIDTransactional
public void updateDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID) throws Exception- Specified by:
updateDuplicateIDTransactionalin interfaceStorageManager- Throws:
Exception
-
storeHeuristicCompletion
public long storeHeuristicCompletion(Xid xid, boolean isCommit) throws Exception
- Specified by:
storeHeuristicCompletionin interfaceStorageManager- Throws:
Exception
-
deleteHeuristicCompletion
public void deleteHeuristicCompletion(long txID) throws Exception- Specified by:
deleteHeuristicCompletionin interfaceStorageManager- Throws:
Exception
-
addQueueBinding
public void addQueueBinding(long tx, Binding binding) throws Exception- Specified by:
addQueueBindingin interfaceStorageManager- Throws:
Exception
-
createLargeMessage
public LargeServerMessage createLargeMessage()
- Specified by:
createLargeMessagein interfaceStorageManager
-
createLargeMessage
public LargeServerMessage createLargeMessage(long id, Message message)
Description copied from interface:StorageManagerCreates a new LargeMessage with the given id.- Specified by:
createLargeMessagein interfaceStorageManagermessage- This is a temporary message that holds the parsed properties. The remoting layer can't create a ServerMessage directly, then this will be replaced.- Returns:
- a large message object
-
largeMessageCreated
public LargeServerMessage largeMessageCreated(long id, LargeServerMessage largeMessage) throws Exception
- Specified by:
largeMessageCreatedin interfaceStorageManager- Throws:
Exception
-
generateID
public long generateID()
- Specified by:
generateIDin interfaceIDGenerator
-
getCurrentID
public long getCurrentID()
- Specified by:
getCurrentIDin interfaceIDGenerator
-
start
public void start() throws Exception- Specified by:
startin interfaceActiveMQComponent- Throws:
Exception
-
stop
public void stop() throws Exception- Specified by:
stopin interfaceActiveMQComponent- Throws:
Exception
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfaceActiveMQComponent
-
loadMessageJournal
public JournalLoadInformation loadMessageJournal(PostOffice postOffice, PagingManager pagingManager, ResourceManager resourceManager, Map<Long,QueueBindingInfo> queueInfos, Map<SimpleString,List<Pair<byte[],Long>>> duplicateIDMap, Set<Pair<Long,Long>> pendingLargeMessages, Set<Long> storedLargeMessages, List<PageCountPending> pendingNonTXPageCounter, JournalLoader journalLoader) throws Exception
- Specified by:
loadMessageJournalin interfaceStorageManager- Throws:
Exception
-
deleteDuplicateIDTransactional
public void deleteDuplicateIDTransactional(long txID, long recordID) throws Exception- Specified by:
deleteDuplicateIDTransactionalin interfaceStorageManager- Throws:
Exception
-
deleteDuplicateID
public void deleteDuplicateID(long recordID) throws Exception- Specified by:
deleteDuplicateIDin interfaceStorageManager- Throws:
Exception
-
pageClosed
public void pageClosed(SimpleString storeName, long pageNumber)
- Specified by:
pageClosedin interfaceStorageManager
-
pageDeleted
public void pageDeleted(SimpleString storeName, long pageNumber)
- Specified by:
pageDeletedin interfaceStorageManager
-
pageWrite
public void pageWrite(PagedMessage message, long pageNumber)
- Specified by:
pageWritein interfaceStorageManager
-
addGrouping
public void addGrouping(GroupBinding groupBinding) throws Exception
- Specified by:
addGroupingin interfaceStorageManager- Throws:
Exception
-
deleteGrouping
public void deleteGrouping(long tx, GroupBinding groupBinding) throws Exception- Specified by:
deleteGroupingin interfaceStorageManager- Throws:
Exception
-
waitOnOperations
public boolean waitOnOperations(long timeout) throws ExceptionDescription copied from interface:StorageManagerBlock until the operations are done. Warning: Don't use it inside an ordered executor, otherwise the system may lock up in case of the pools are full- Specified by:
waitOnOperationsin interfaceStorageManager- Throws:
Exception
-
afterCompleteOperations
public void afterCompleteOperations(IOCallback run)
- Specified by:
afterCompleteOperationsin interfaceStorageManager
-
afterStoreOperations
public void afterStoreOperations(IOCallback run)
Description copied from interface:StorageManagerThis is similar to afterComplete, however this only cares about the journal part.- Specified by:
afterStoreOperationsin interfaceStorageManager
-
waitOnOperations
public void waitOnOperations() throws ExceptionDescription copied from interface:StorageManagerBlock until the operations are done. Warning: Don't use it inside an ordered executor, otherwise the system may lock up in case of the pools are full- Specified by:
waitOnOperationsin interfaceStorageManager- Throws:
Exception
-
getContext
public OperationContext getContext()
Description copied from interface:StorageManagerGet the context associated with the thread for later reuse- Specified by:
getContextin interfaceStorageManager
-
newContext
public OperationContext newContext(Executor executor)
Description copied from interface:StorageManagerIt just creates an OperationContext without associating it- Specified by:
newContextin interfaceStorageManager
-
newSingleThreadContext
public OperationContext newSingleThreadContext()
- Specified by:
newSingleThreadContextin interfaceStorageManager
-
setContext
public void setContext(OperationContext context)
Description copied from interface:StorageManagerSet the context back to the thread- Specified by:
setContextin interfaceStorageManager
-
clearContext
public void clearContext()
- Specified by:
clearContextin interfaceStorageManager
-
recoverAddressSettings
public List<PersistedAddressSetting> recoverAddressSettings() throws Exception
- Specified by:
recoverAddressSettingsin interfaceStorageManager- Throws:
Exception
-
storeAddressSetting
public void storeAddressSetting(PersistedAddressSetting addressSetting) throws Exception
- Specified by:
storeAddressSettingin interfaceStorageManager- Throws:
Exception
-
recoverSecuritySettings
public List<PersistedSecuritySetting> recoverSecuritySettings() throws Exception
- Specified by:
recoverSecuritySettingsin interfaceStorageManager- Throws:
Exception
-
storeDivertConfiguration
public void storeDivertConfiguration(PersistedDivertConfiguration persistedDivertConfiguration) throws Exception
- Specified by:
storeDivertConfigurationin interfaceStorageManager- Throws:
Exception
-
deleteDivertConfiguration
public void deleteDivertConfiguration(String divertName) throws Exception
- Specified by:
deleteDivertConfigurationin interfaceStorageManager- Throws:
Exception
-
recoverDivertConfigurations
public List<PersistedDivertConfiguration> recoverDivertConfigurations()
- Specified by:
recoverDivertConfigurationsin interfaceStorageManager
-
storeBridgeConfiguration
public void storeBridgeConfiguration(PersistedBridgeConfiguration persistedBridgeConfiguration) throws Exception
- Specified by:
storeBridgeConfigurationin interfaceStorageManager- Throws:
Exception
-
deleteBridgeConfiguration
public void deleteBridgeConfiguration(String bridgeName) throws Exception
- Specified by:
deleteBridgeConfigurationin interfaceStorageManager- Throws:
Exception
-
recoverBridgeConfigurations
public List<PersistedBridgeConfiguration> recoverBridgeConfigurations()
- Specified by:
recoverBridgeConfigurationsin interfaceStorageManager
-
storeConnector
public void storeConnector(PersistedConnector persistedConnector) throws Exception
- Specified by:
storeConnectorin interfaceStorageManager- Throws:
Exception
-
deleteConnector
public void deleteConnector(String connectorName) throws Exception
- Specified by:
deleteConnectorin interfaceStorageManager- Throws:
Exception
-
recoverConnectors
public List<PersistedConnector> recoverConnectors()
- Specified by:
recoverConnectorsin interfaceStorageManager
-
storeUser
public void storeUser(PersistedUser persistedUser) throws Exception
- Specified by:
storeUserin interfaceStorageManager- Throws:
Exception
-
deleteUser
public void deleteUser(String username) throws Exception
- Specified by:
deleteUserin interfaceStorageManager- Throws:
Exception
-
getPersistedUsers
public Map<String,PersistedUser> getPersistedUsers()
- Specified by:
getPersistedUsersin interfaceStorageManager
-
storeRole
public void storeRole(PersistedRole persistedRole) throws Exception
- Specified by:
storeRolein interfaceStorageManager- Throws:
Exception
-
deleteRole
public void deleteRole(String role) throws Exception
- Specified by:
deleteRolein interfaceStorageManager- Throws:
Exception
-
getPersistedRoles
public Map<String,PersistedRole> getPersistedRoles()
- Specified by:
getPersistedRolesin interfaceStorageManager
-
storeKeyValuePair
public void storeKeyValuePair(PersistedKeyValuePair persistedKeyValuePair) throws Exception
- Specified by:
storeKeyValuePairin interfaceStorageManager- Throws:
Exception
-
deleteKeyValuePair
public void deleteKeyValuePair(String mapId, String key) throws Exception
- Specified by:
deleteKeyValuePairin interfaceStorageManager- Throws:
Exception
-
getPersistedKeyValuePairs
public Map<String,PersistedKeyValuePair> getPersistedKeyValuePairs(String mapId)
- Specified by:
getPersistedKeyValuePairsin interfaceStorageManager
-
storeSecuritySetting
public void storeSecuritySetting(PersistedSecuritySetting persistedRoles) throws Exception
- Specified by:
storeSecuritySettingin interfaceStorageManager- Throws:
Exception
-
deleteAddressSetting
public void deleteAddressSetting(SimpleString addressMatch) throws Exception
- Specified by:
deleteAddressSettingin interfaceStorageManager- Throws:
Exception
-
deleteSecuritySetting
public void deleteSecuritySetting(SimpleString addressMatch) throws Exception
- Specified by:
deleteSecuritySettingin interfaceStorageManager- Throws:
Exception
-
deletePageTransactional
public void deletePageTransactional(long recordID) throws Exception- Specified by:
deletePageTransactionalin interfaceStorageManager- Throws:
Exception
-
updatePageTransaction
public void updatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depage) throws Exception- Specified by:
updatePageTransactionin interfaceStorageManager- Throws:
Exception
-
storeCursorAcknowledge
public void storeCursorAcknowledge(long queueID, PagePosition position)- Specified by:
storeCursorAcknowledgein interfaceStorageManager
-
storeCursorAcknowledgeTransactional
public void storeCursorAcknowledgeTransactional(long txID, long queueID, PagePosition position)- Specified by:
storeCursorAcknowledgeTransactionalin interfaceStorageManager
-
deleteCursorAcknowledgeTransactional
public void deleteCursorAcknowledgeTransactional(long txID, long ackID) throws Exception- Specified by:
deleteCursorAcknowledgeTransactionalin interfaceStorageManager- Throws:
Exception
-
deleteCursorAcknowledge
public void deleteCursorAcknowledge(long ackID) throws Exception- Specified by:
deleteCursorAcknowledgein interfaceStorageManager- Throws:
Exception
-
storePageCompleteTransactional
public void storePageCompleteTransactional(long txID, long queueID, PagePosition position) throws Exception- Specified by:
storePageCompleteTransactionalin interfaceStorageManager- Throws:
Exception
-
deletePageComplete
public void deletePageComplete(long ackID) throws Exception- Specified by:
deletePageCompletein interfaceStorageManager- Throws:
Exception
-
storePageCounter
public long storePageCounter(long txID, long queueID, long value, long size) throws Exception- Specified by:
storePageCounterin interfaceStorageManager- Returns:
- The ID with the stored counter
- Throws:
Exception
-
storePendingCounter
public long storePendingCounter(long queueID, long pageID) throws Exception- Specified by:
storePendingCounterin interfaceStorageManager- Throws:
Exception
-
deleteIncrementRecord
public void deleteIncrementRecord(long txID, long recordID) throws Exception- Specified by:
deleteIncrementRecordin interfaceStorageManager- Throws:
Exception
-
deletePageCounter
public void deletePageCounter(long txID, long recordID) throws Exception- Specified by:
deletePageCounterin interfaceStorageManager- Throws:
Exception
-
deletePendingPageCounter
public void deletePendingPageCounter(long txID, long recordID) throws Exception- Specified by:
deletePendingPageCounterin interfaceStorageManager- Throws:
Exception
-
storePageCounterInc
public long storePageCounterInc(long txID, long queueID, int add, long size) throws Exception- Specified by:
storePageCounterIncin interfaceStorageManager- Returns:
- the ID with the increment record
- Throws:
Exception
-
storePageCounterInc
public long storePageCounterInc(long queueID, int add, long size) throws Exception- Specified by:
storePageCounterIncin interfaceStorageManager- Returns:
- the ID with the increment record
- Throws:
Exception
-
commit
public void commit(long txID, boolean lineUpContext) throws Exception- Specified by:
commitin interfaceStorageManager- Throws:
Exception
-
lineUpContext
public void lineUpContext()
- Specified by:
lineUpContextin interfaceStorageManager
-
confirmPendingLargeMessageTX
public void confirmPendingLargeMessageTX(Transaction transaction, long messageID, long recordID) throws Exception
Description copied from interface:StorageManagerConfirms that a large message was finished- Specified by:
confirmPendingLargeMessageTXin interfaceStorageManager- Throws:
Exception
-
confirmPendingLargeMessage
public void confirmPendingLargeMessage(long recordID) throws ExceptionDescription copied from interface:StorageManagerConfirms that a large message was finished- Specified by:
confirmPendingLargeMessagein interfaceStorageManager- Throws:
Exception
-
stop
public void stop(boolean ioCriticalError, boolean sendFailover) throws Exception- Specified by:
stopin interfaceStorageManager- Parameters:
ioCriticalError- is the server being stopped due to an IO critical error.sendFailover- this is to send the replication stopping in case of replication.- Throws:
Exception
-
getBindingsJournal
public Journal getBindingsJournal()
- Specified by:
getBindingsJournalin interfaceStorageManager- Returns:
- the bindings journal
-
getMessageJournal
public Journal getMessageJournal()
- Specified by:
getMessageJournalin interfaceStorageManager- Returns:
- the message journal
-
startReplication
public void startReplication(ReplicationManager replicationManager, PagingManager pagingManager, String nodeID, boolean autoFailBack, long initialReplicationSyncTimeout) throws Exception
-
deleteLargeMessageBody
public void deleteLargeMessageBody(LargeServerMessage largeServerMessage) throws ActiveMQException
- Specified by:
deleteLargeMessageBodyin interfaceStorageManager- Throws:
ActiveMQException
-
largeMessageClosed
public void largeMessageClosed(LargeServerMessage largeServerMessage) throws ActiveMQException
- Specified by:
largeMessageClosedin interfaceStorageManager- Throws:
ActiveMQException
-
addToPage
public boolean addToPage(PagingStore store, Message msg, Transaction tx, RouteContextList listCtx) throws Exception
Description copied from interface:StorageManagerWrite message to page if we are paging.- Specified by:
addToPagein interfaceStorageManager- Returns:
trueif we are paging and have handled the data,falseif the data needs to be sent to the journal- Throws:
Exception
-
stopReplication
public void stopReplication()
Description copied from interface:StorageManagerStops the replication of data from the live to the backup.Typical scenario is a broken connection.
- Specified by:
stopReplicationin interfaceStorageManager
-
createFileForLargeMessage
public SequentialFile createFileForLargeMessage(long messageID, StorageManager.LargeMessageExtension extension)
Description copied from interface:StorageManagerInstantiates a SequentialFile to be used for storing aLargeServerMessage.- Specified by:
createFileForLargeMessagein interfaceStorageManager- Parameters:
messageID- the id of the messageextension- the extension to add to the file- Returns:
-
addBytesToLargeMessage
public void addBytesToLargeMessage(SequentialFile appendFile, long messageID, byte[] bytes) throws Exception
- Specified by:
addBytesToLargeMessagein interfaceStorageManager- Throws:
Exception
-
addBytesToLargeMessage
public void addBytesToLargeMessage(SequentialFile file, long messageId, ActiveMQBuffer bytes) throws Exception
- Specified by:
addBytesToLargeMessagein interfaceStorageManager- Throws:
Exception
-
allocateDirectBuffer
public ByteBuffer allocateDirectBuffer(int size)
Description copied from interface:StorageManagerAIO has an optimized buffer which has a method to release it instead of the way NIO will release data based on GC. These methods will use that buffer if the inner method supports it- Specified by:
allocateDirectBufferin interfaceStorageManager
-
freeDirectBuffer
public void freeDirectBuffer(ByteBuffer buffer)
Description copied from interface:StorageManagerAIO has an optimized buffer which has a method to release it instead of the way NIO will release data based on GC. These methods will use that buffer if the inner method supports it- Specified by:
freeDirectBufferin interfaceStorageManager
-
storeID
public void storeID(long journalID, long id) throws ExceptionDescription copied from interface:StorageManagerStores the id from IDManager.- Specified by:
storeIDin interfaceStorageManager- Throws:
Exception
-
persistIdGenerator
public void persistIdGenerator()
Description copied from interface:StorageManagerCloses theIDGeneratorpersisting the current record ID.Effectively a "pre-stop" method. Necessary due to the "stop"-order at
ActiveMQServerImpl- Specified by:
persistIdGeneratorin interfaceStorageManager
-
deleteID
public void deleteID(long journalD) throws Exception- Specified by:
deleteIDin interfaceStorageManager- Throws:
Exception
-
-