Class AbstractJournalStorageManager
java.lang.Object
org.apache.activemq.artemis.utils.critical.CriticalComponentImpl
org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager
- All Implemented Interfaces:
MapStorageManager,StorageManager,ActiveMQComponent,CriticalComponent,IDGenerator
- Direct Known Subclasses:
JournalStorageManager
public abstract class AbstractJournalStorageManager
extends CriticalComponentImpl
implements StorageManager
Controls access to the journals and other storage files such as the ones used to store pages and large messages.
This class must control writing of any non-transient data, as it is the key point for synchronizing any replicating
backup server.
Using this class also ensures that locks are acquired in the right order, avoiding dead-locks.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.activemq.artemis.core.persistence.StorageManager
StorageManager.LargeMessageExtension -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Journalprotected final Configurationprotected static final intprotected static final intprotected static final intprotected static final intprotected static final ArtemisCloseableprotected final ExecutorFactoryUsed to create Operation Contextsprotected BatchingIDGeneratorprotected final IOCriticalErrorListenerprotected final ExecutorFactoryprotected booleanprotected final ConcurrentLongHashMap<LargeServerMessage>protected final Map<SimpleString,AbstractPersistedAddressSetting> protected final Map<String,PersistedBridgeConfiguration> protected final Map<String,PersistedConnector> protected final Map<String,PersistedDivertConfiguration> protected final ConcurrentMap<String,ConcurrentMap<String, PersistedKeyValuePair>> protected final Map<String,PersistedRole> protected final Map<SimpleString,PersistedSecuritySetting> protected final Map<String,PersistedUser> protected Journalprotected final ScheduledExecutorServiceprotected booleanprotected final ReentrantReadWriteLockprotected final ArtemisCloseable -
Constructor Summary
ConstructorsConstructorDescriptionAbstractJournalStorageManager(Configuration config, CriticalAnalyzer analyzer, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutorFactory) AbstractJournalStorageManager(Configuration config, CriticalAnalyzer analyzer, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutorFactory, IOCriticalErrorListener criticalErrorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAddressBinding(long tx, AddressInfo addressInfo) 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.voidvoidafterCompleteOperations(IOCallback run, OperationConsistencyLevel consistencyLevel) voidThis is similar to afterComplete, however this only cares about the journal part.voidasyncCommit(long txID) protected abstract voidprotected abstract voidvoidcheckInvalidPageTransactions(PagingManager pagingManager, Set<PageTransactionInfo> invalidPageTransactions) voidcloseableReadLock(boolean tryLock) Read lock the StorageManager.voidcommit(long txID) voidcommit(long txID, boolean lineUpContext) voidcommitBindings(long txID) voidconfirmPendingLargeMessage(long recordID) We don't need messageID now but we are likely to need it we ever decide to support a databasevoidconfirmPendingLargeMessageTX(Transaction tx, long messageID, long recordID) Confirms that a large message was finishedvoidcriticalError(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 id) voiddeleteID(long journalD) voiddeleteIncrementRecord(long txID, long recordID) voiddeleteKeyValuePair(String mapId, String key) voiddeleteMapRecord(long id, boolean sync) voiddeleteMapRecordTx(long txid, long id) 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 username) voiddeleteSecuritySetting(SimpleString addressMatch) voiddeleteUser(String username) longGet the context associated with the thread for later reuselonglonggetPersistedKeyValuePairs(String mapId) longprotected abstract voidinit(Configuration config, IOCriticalErrorListener criticalErrorListener) Called during initialization.booleanvoidloadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos, List<AddressBindingInfo> addressBindingInfos) 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, List<Consumer<RecordInfo>> journalRecordsListener) protected static PersistentAddressBindingEncodingnewAddressBindingEncoding(long id, ActiveMQBuffer buffer) newContext(Executor executor1) It just creates an OperationContext without associating itprotected static PersistentQueueBindingEncodingnewQueueBindingEncoding(long id, ActiveMQBuffer buffer) protected static QueueStatusEncodingnewQueueStatusEncoding(long id, ActiveMQBuffer buffer) protected static PersistedSecuritySettingnewSecurityRecord(long id, ActiveMQBuffer buffer) protected abstract LargeServerMessageprotected abstract voidAssumption is that this is only called with a writeLock on the StorageManager.voidCloses theIDGeneratorpersisting the current record ID.voidrecoverAddressSettings(SimpleString address) voidrollback(long txID) voidrollbackBindings(long txID) voidsetContext(OperationContext context) Set the context back to the threadvoidstart()voidstop()voidstop(boolean ioCriticalError, boolean sendFailover) Stop thisStorageManagervoidstoreAcknowledge(long queueID, long messageID) voidstoreAcknowledgeTransactional(long txID, long queueID, long messageID) voidstoreAddressSetting(PersistedAddressSettingJSON 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) voidstoreMapRecord(long id, byte recordType, Persister persister, Object record, boolean sync) voidstoreMapRecord(long id, byte recordType, Persister persister, Object record, boolean sync, IOCompletion completionCallback) voidstoreMessage(Message message) voidstoreMessageTransactional(long txID, Message message) voidstorePageCompleteTransactional(long txID, long queueID, PagePosition position) longstorePageCounter(long txID, long queueID, long value, long persistentSize) Store the specificed page counter.longstorePageCounterInc(long queueID, int value, long persistentSize) Store the specificed page counter increment.longstorePageCounterInc(long txID, long queueID, int value, long persistentSize) Store the specificed page counter increment.voidstorePageTransaction(long txID, PageTransactionInfo pageTransaction) longstorePendingCounter(long queueID, long pageID) longstoreQueueStatus(long queueID, AddressQueueStatus status) Store a queue's status.voidstoreReference(long queueID, long messageID, boolean last) voidstoreReferenceTransactional(long txID, long queueID, long messageID) voidstoreRole(PersistedRole persistedRole) voidstoreSecuritySetting(PersistedSecuritySetting persistedRoles) voidstoreUser(PersistedUser persistedUser) voidvoidupdateDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID) voidupdatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depages) voidupdateQueueBinding(long tx, Binding binding) voidvoidupdateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) final voidBlock until the operations are done.final booleanwaitOnOperations(long timeout) Block until the operations are done.voidvoidMethods inherited from class org.apache.activemq.artemis.utils.critical.CriticalComponentImpl
checkExpiration, getCriticalAnalyzer, measureCriticalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStopMethods inherited from interface org.apache.activemq.artemis.core.persistence.StorageManager
addBytesToLargeMessage, addBytesToLargeMessage, allocateDirectBuffer, closeableReadLock, createCoreLargeMessage, createCoreLargeMessage, createFileForLargeMessage, createFileForLargeMessage, deleteLargeMessageBody, freeDirectBuffer, getAllowedPageSize, getJournalSequentialFileFactory, getUsedConnections, injectMonitor, isReplicated, largeMessageClosed, loadMessageJournal, loadMessageJournal, onLargeMessageCreate, pageClosed, pageDeleted, pageWrite, recoverLargeMessagesOnFolder, startReplication, stopReplication
-
Field Details
-
CRITICAL_PATHS
protected static final int CRITICAL_PATHS- See Also:
-
CRITICAL_STORE
protected static final int CRITICAL_STORE- See Also:
-
CRITICAL_STOP
protected static final int CRITICAL_STOP- See Also:
-
CRITICAL_STOP_2
protected static final int CRITICAL_STOP_2- See Also:
-
idGenerator
-
ioExecutorFactory
-
scheduledExecutorService
-
storageManagerLock
-
unlockCloseable
-
dummyCloseable
-
messageJournal
-
bindingsJournal
-
started
protected volatile boolean started -
executorFactory
Used to create Operation Contexts -
journalLoaded
protected boolean journalLoaded -
ioCriticalErrorListener
-
config
-
mapPersistedSecuritySettings
-
mapPersistedAddressSettings
-
mapPersistedDivertConfigurations
-
mapPersistedBridgeConfigurations
-
mapPersistedConnectors
-
mapPersistedUsers
-
mapPersistedRoles
-
mapPersistedKeyValuePairs
protected final ConcurrentMap<String,ConcurrentMap<String, mapPersistedKeyValuePairsPersistedKeyValuePair>> -
largeMessagesToDelete
-
-
Constructor Details
-
AbstractJournalStorageManager
public AbstractJournalStorageManager(Configuration config, CriticalAnalyzer analyzer, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutorFactory) -
AbstractJournalStorageManager
public AbstractJournalStorageManager(Configuration config, CriticalAnalyzer analyzer, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutorFactory, IOCriticalErrorListener criticalErrorListener)
-
-
Method Details
-
getConfig
-
getMaxRecordSize
public long getMaxRecordSize()- Specified by:
getMaxRecordSizein interfaceStorageManager
-
getWarningRecordSize
public long getWarningRecordSize()- Specified by:
getWarningRecordSizein interfaceStorageManager
-
init
Called during initialization. Used by implementations to setup Journals, Stores etc... -
criticalError
- Specified by:
criticalErrorin interfaceStorageManager
-
clearContext
public void clearContext()- Specified by:
clearContextin interfaceStorageManager
-
getIDGenerator
-
waitOnOperations
Description 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
-
waitOnOperations
Description 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
Description copied from interface:StorageManagerGet the context associated with the thread for later reuse- Specified by:
getContextin interfaceStorageManager
-
setContext
Description copied from interface:StorageManagerSet the context back to the thread- Specified by:
setContextin interfaceStorageManager
-
newSingleThreadContext
- Specified by:
newSingleThreadContextin interfaceStorageManager
-
newContext
Description copied from interface:StorageManagerIt just creates an OperationContext without associating it- Specified by:
newContextin interfaceStorageManager
-
afterCompleteOperations
- Specified by:
afterCompleteOperationsin interfaceStorageManager
-
afterCompleteOperations
- Specified by:
afterCompleteOperationsin interfaceStorageManager
-
afterStoreOperations
Description copied from interface:StorageManagerThis is similar to afterComplete, however this only cares about the journal part.- Specified by:
afterStoreOperationsin interfaceStorageManager
-
generateID
public long generateID()- Specified by:
generateIDin interfaceIDGenerator
-
getCurrentID
public long getCurrentID()- Specified by:
getCurrentIDin interfaceIDGenerator
-
confirmPendingLargeMessageTX
public void confirmPendingLargeMessageTX(Transaction tx, long messageID, long recordID) throws Exception Description copied from interface:StorageManagerConfirms that a large message was finished- Specified by:
confirmPendingLargeMessageTXin interfaceStorageManager- Throws:
Exception
-
confirmPendingLargeMessage
We don't need messageID now but we are likely to need it we ever decide to support a database- Specified by:
confirmPendingLargeMessagein interfaceStorageManager- Throws:
Exception
-
storeMapRecord
public void storeMapRecord(long id, byte recordType, Persister persister, Object record, boolean sync, IOCompletion completionCallback) throws Exception - Specified by:
storeMapRecordin interfaceMapStorageManager- Throws:
Exception
-
storeMapRecord
public void storeMapRecord(long id, byte recordType, Persister persister, Object record, boolean sync) throws Exception - Specified by:
storeMapRecordin interfaceMapStorageManager- Throws:
Exception
-
deleteMapRecord
- Specified by:
deleteMapRecordin interfaceMapStorageManager- Throws:
Exception
-
deleteMapRecordTx
- Specified by:
deleteMapRecordTxin interfaceMapStorageManager- Throws:
Exception
-
storeMessage
- Specified by:
storeMessagein interfaceStorageManager- Throws:
Exception
-
storeReference
- Specified by:
storeReferencein interfaceStorageManager- Throws:
Exception
-
writeLock
public void writeLock()- Specified by:
writeLockin interfaceStorageManager
-
writeUnlock
public void writeUnlock()- Specified by:
writeUnlockin interfaceStorageManager
-
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
-
storeAcknowledge
- Specified by:
storeAcknowledgein interfaceStorageManager- Throws:
Exception
-
storeCursorAcknowledge
- Specified by:
storeCursorAcknowledgein interfaceStorageManager- Throws:
Exception
-
deleteMessage
- Specified by:
deleteMessagein interfaceStorageManager- Throws:
Exception
-
updateScheduledDeliveryTime
- Specified by:
updateScheduledDeliveryTimein interfaceStorageManager- Throws:
Exception
-
storeDuplicateID
- Specified by:
storeDuplicateIDin interfaceStorageManager- Throws:
Exception
-
deleteDuplicateID
- Specified by:
deleteDuplicateIDin interfaceStorageManager- Throws:
Exception
-
storeMessageTransactional
- Specified by:
storeMessageTransactionalin interfaceStorageManager- Throws:
Exception
-
storePageTransaction
- Specified by:
storePageTransactionin interfaceStorageManager- Throws:
Exception
-
updatePageTransaction
public void updatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depages) throws Exception - Specified by:
updatePageTransactionin interfaceStorageManager- Throws:
Exception
-
storeReferenceTransactional
- Specified by:
storeReferenceTransactionalin interfaceStorageManager- Throws:
Exception
-
storeAcknowledgeTransactional
- Specified by:
storeAcknowledgeTransactionalin interfaceStorageManager- Throws:
Exception
-
storeCursorAcknowledgeTransactional
public void storeCursorAcknowledgeTransactional(long txID, long queueID, PagePosition position) throws Exception - Specified by:
storeCursorAcknowledgeTransactionalin interfaceStorageManager- Throws:
Exception
-
storePageCompleteTransactional
public void storePageCompleteTransactional(long txID, long queueID, PagePosition position) throws Exception - Specified by:
storePageCompleteTransactionalin interfaceStorageManager- Throws:
Exception
-
deletePageComplete
- Specified by:
deletePageCompletein interfaceStorageManager- Throws:
Exception
-
deleteCursorAcknowledgeTransactional
- Specified by:
deleteCursorAcknowledgeTransactionalin interfaceStorageManager- Throws:
Exception
-
deleteCursorAcknowledge
- Specified by:
deleteCursorAcknowledgein interfaceStorageManager- Throws:
Exception
-
storeHeuristicCompletion
- Specified by:
storeHeuristicCompletionin interfaceStorageManager- Throws:
Exception
-
deleteHeuristicCompletion
- Specified by:
deleteHeuristicCompletionin interfaceStorageManager- Throws:
Exception
-
deletePageTransactional
- Specified by:
deletePageTransactionalin interfaceStorageManager- Throws:
Exception
-
updateScheduledDeliveryTimeTransactional
public void updateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) throws Exception - Specified by:
updateScheduledDeliveryTimeTransactionalin interfaceStorageManager- Throws:
Exception
-
prepare
- Specified by:
preparein interfaceStorageManager- Throws:
Exception
-
commit
- Specified by:
commitin interfaceStorageManager- Throws:
Exception
-
commitBindings
- Specified by:
commitBindingsin interfaceStorageManager- Throws:
Exception
-
rollbackBindings
- Specified by:
rollbackBindingsin interfaceStorageManager- Throws:
Exception
-
commit
- Specified by:
commitin interfaceStorageManager- Throws:
Exception
-
asyncCommit
- Specified by:
asyncCommitin interfaceStorageManager- Throws:
Exception
-
rollback
- Specified by:
rollbackin 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
-
deleteDuplicateIDTransactional
- Specified by:
deleteDuplicateIDTransactionalin interfaceStorageManager- Throws:
Exception
-
updateDeliveryCount
- Specified by:
updateDeliveryCountin interfaceStorageManager- Throws:
Exception
-
storeAddressSetting
- Specified by:
storeAddressSettingin interfaceStorageManager- Throws:
Exception
-
recoverAddressSettings
- Specified by:
recoverAddressSettingsin interfaceStorageManager- Throws:
Exception
-
recoverAddressSettings
- Specified by:
recoverAddressSettingsin interfaceStorageManager
-
recoverSecuritySettings
- Specified by:
recoverSecuritySettingsin interfaceStorageManager- Throws:
Exception
-
storeSecuritySetting
- Specified by:
storeSecuritySettingin interfaceStorageManager- Throws:
Exception
-
storeDivertConfiguration
public void storeDivertConfiguration(PersistedDivertConfiguration persistedDivertConfiguration) throws Exception - Specified by:
storeDivertConfigurationin interfaceStorageManager- Throws:
Exception
-
deleteDivertConfiguration
- Specified by:
deleteDivertConfigurationin interfaceStorageManager- Throws:
Exception
-
recoverDivertConfigurations
- Specified by:
recoverDivertConfigurationsin interfaceStorageManager
-
storeBridgeConfiguration
public void storeBridgeConfiguration(PersistedBridgeConfiguration persistedBridgeConfiguration) throws Exception - Specified by:
storeBridgeConfigurationin interfaceStorageManager- Throws:
Exception
-
deleteBridgeConfiguration
- Specified by:
deleteBridgeConfigurationin interfaceStorageManager- Throws:
Exception
-
recoverBridgeConfigurations
- Specified by:
recoverBridgeConfigurationsin interfaceStorageManager
-
storeConnector
- Specified by:
storeConnectorin interfaceStorageManager- Throws:
Exception
-
deleteConnector
- Specified by:
deleteConnectorin interfaceStorageManager- Throws:
Exception
-
recoverConnectors
- Specified by:
recoverConnectorsin interfaceStorageManager
-
storeUser
- Specified by:
storeUserin interfaceStorageManager- Throws:
Exception
-
deleteUser
- Specified by:
deleteUserin interfaceStorageManager- Throws:
Exception
-
getPersistedUsers
- Specified by:
getPersistedUsersin interfaceStorageManager
-
storeRole
- Specified by:
storeRolein interfaceStorageManager- Throws:
Exception
-
deleteRole
- Specified by:
deleteRolein interfaceStorageManager- Throws:
Exception
-
getPersistedRoles
- Specified by:
getPersistedRolesin interfaceStorageManager
-
storeKeyValuePair
- Specified by:
storeKeyValuePairin interfaceStorageManager- Throws:
Exception
-
deleteKeyValuePair
- Specified by:
deleteKeyValuePairin interfaceStorageManager- Throws:
Exception
-
getPersistedKeyValuePairs
- Specified by:
getPersistedKeyValuePairsin interfaceStorageManager
-
storeID
Description copied from interface:StorageManagerStores the id from IDManager.- Specified by:
storeIDin interfaceStorageManager- Throws:
Exception
-
deleteID
- Specified by:
deleteIDin interfaceStorageManager- Throws:
Exception
-
deleteAddressSetting
- Specified by:
deleteAddressSettingin interfaceStorageManager- Throws:
Exception
-
deleteSecuritySetting
- Specified by:
deleteSecuritySettingin interfaceStorageManager- Throws:
Exception
-
loadMessageJournal
public JournalLoadInformation loadMessageJournal(PostOffice postOffice, PagingManager pagingManager, ResourceManager resourceManager, Map<Long, QueueBindingInfo> queueInfos, Map<SimpleString, throws ExceptionList<Pair<byte[], Long>>> duplicateIDMap, Set<Pair<Long, Long>> pendingLargeMessages, Set<Long> storedLargeMessages, List<PageCountPending> pendingNonTXPageCounter, JournalLoader journalLoader, List<Consumer<RecordInfo>> journalRecordsListener) - Specified by:
loadMessageJournalin interfaceStorageManager- Throws:
Exception
-
checkInvalidPageTransactions
public void checkInvalidPageTransactions(PagingManager pagingManager, Set<PageTransactionInfo> invalidPageTransactions) -
addGrouping
- Specified by:
addGroupingin interfaceStorageManager- Throws:
Exception
-
deleteGrouping
- Specified by:
deleteGroupingin interfaceStorageManager- Throws:
Exception
-
updateQueueBinding
- Specified by:
updateQueueBindingin interfaceStorageManager- Throws:
Exception
-
addQueueBinding
- Specified by:
addQueueBindingin interfaceStorageManager- Throws:
Exception
-
deleteQueueBinding
- Specified by:
deleteQueueBindingin interfaceStorageManager- Throws:
Exception
-
storeQueueStatus
Description copied from interface:StorageManagerStore a queue's status.- 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
-
deleteQueueStatus
- Specified by:
deleteQueueStatusin interfaceStorageManager- Throws:
Exception
-
storeAddressStatus
- Specified by:
storeAddressStatusin interfaceStorageManager- Throws:
Exception
-
deleteAddressStatus
- Specified by:
deleteAddressStatusin interfaceStorageManager- Throws:
Exception
-
addAddressBinding
- Specified by:
addAddressBindingin interfaceStorageManager- Throws:
Exception
-
deleteAddressBinding
- Specified by:
deleteAddressBindingin interfaceStorageManager- Throws:
Exception
-
storePageCounterInc
public long storePageCounterInc(long txID, long queueID, int value, long persistentSize) throws Exception Description copied from interface:StorageManagerStore the specificed page counter increment.- Specified by:
storePageCounterIncin interfaceStorageManager- Returns:
- the ID with the increment record
- Throws:
Exception
-
storePageCounterInc
Description copied from interface:StorageManagerStore the specificed page counter increment.- Specified by:
storePageCounterIncin interfaceStorageManager- Returns:
- the ID with the increment record
- Throws:
Exception
-
storePageCounter
public long storePageCounter(long txID, long queueID, long value, long persistentSize) throws Exception Description copied from interface:StorageManagerStore the specificed page counter.- Specified by:
storePageCounterin interfaceStorageManager- Returns:
- The ID with the stored counter
- Throws:
Exception
-
storePendingCounter
- Specified by:
storePendingCounterin interfaceStorageManager- Throws:
Exception
-
deleteIncrementRecord
- Specified by:
deleteIncrementRecordin interfaceStorageManager- Throws:
Exception
-
deletePageCounter
- Specified by:
deletePageCounterin interfaceStorageManager- Throws:
Exception
-
deletePendingPageCounter
- Specified by:
deletePendingPageCounterin interfaceStorageManager- Throws:
Exception
-
loadBindingJournal
public JournalLoadInformation loadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos, List<AddressBindingInfo> addressBindingInfos) throws Exception - Specified by:
loadBindingJournalin interfaceStorageManager- Throws:
Exception
-
lineUpContext
public void lineUpContext()- Specified by:
lineUpContextin interfaceStorageManager
-
beforeStart
- Throws:
Exception
-
start
- Specified by:
startin interfaceActiveMQComponent- Throws:
Exception
-
stop
- Specified by:
stopin interfaceActiveMQComponent- 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
-
performCachedLargeMessageDeletes
protected abstract void performCachedLargeMessageDeletes()Assumption is that this is only called with a writeLock on the StorageManager. -
stop
Description copied from interface:StorageManagerStop thisStorageManager- 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
-
beforeStop
- Throws:
Exception
-
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceActiveMQComponent
-
loadInternalOnly
- Throws:
Exception
-
getMessageJournal
- Specified by:
getMessageJournalin interfaceStorageManager
-
getBindingsJournal
- Specified by:
getBindingsJournalin interfaceStorageManager
-
parseLargeMessage
- Throws:
Exception
-
newSecurityRecord
-
newQueueBindingEncoding
protected static PersistentQueueBindingEncoding newQueueBindingEncoding(long id, ActiveMQBuffer buffer) -
newQueueStatusEncoding
-
newAddressBindingEncoding
protected static PersistentAddressBindingEncoding newAddressBindingEncoding(long id, ActiveMQBuffer buffer) -
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
-