public class JournalStorageManager extends AbstractJournalStorageManager
AbstractJournalStorageManager.JournalContentStorageManager.LargeMessageExtension| Modifier and Type | Field and Description |
|---|---|
protected String |
largeMessagesDirectory |
bindingsJournal, config, idGenerator, journalLoaded, largeMessagesToDelete, mapPersistedAddressSettings, mapPersistedRoles, messageJournal, pageMaxConcurrentIO, perfBlastPages, started, storageManagerLock| Constructor and Description |
|---|
JournalStorageManager(Configuration config,
ExecutorFactory executorFactory) |
JournalStorageManager(Configuration config,
ExecutorFactory executorFactory,
IOCriticalErrorListener criticalErrorListener) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBytesToLargeMessage(SequentialFile file,
long messageId,
byte[] bytes) |
ByteBuffer |
allocateDirectBuffer(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.
|
protected void |
beforeStart() |
protected void |
beforeStop() |
protected SequentialFile |
createFileForLargeMessage(long messageID,
boolean durable) |
SequentialFile |
createFileForLargeMessage(long messageID,
StorageManager.LargeMessageExtension extension)
Instantiates a SequentialFile to be used for storing a
LargeServerMessage. |
LargeServerMessage |
createLargeMessage() |
LargeServerMessage |
createLargeMessage(long id,
MessageInternal message)
Creates a new LargeMessage with the given id.
|
void |
freeDirectBuffer(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.
|
protected void |
init(Configuration config,
IOCriticalErrorListener criticalErrorListener)
Called during initialization.
|
boolean |
isReplicated() |
void |
pageClosed(SimpleString storeName,
int pageNumber) |
void |
pageDeleted(SimpleString storeName,
int pageNumber) |
void |
pageWrite(PagedMessage message,
int pageNumber) |
protected LargeServerMessage |
parseLargeMessage(Map<Long,ServerMessage> messages,
ActiveMQBuffer buff) |
protected void |
performCachedLargeMessageDeletes()
Assumption is that this is only called with a writeLock on the StorageManager.
|
void |
startReplication(ReplicationManager replicationManager,
PagingManager pagingManager,
String nodeID,
boolean autoFailBack,
long initialReplicationSyncTimeout) |
void |
stop() |
void |
stop(boolean ioCriticalError) |
void |
stopReplication()
Stops replication by resetting replication-related fields to their 'unreplicated' state.
|
long |
storePendingLargeMessage(long messageID) |
addGrouping, addQueueBinding, addToPage, afterCompleteOperations, afterPageRead, afterStoreOperations, beforePageRead, clearContext, commit, commit, commitBindings, confirmLargeMessage, confirmPendingLargeMessage, confirmPendingLargeMessageTX, criticalError, deleteAddressSetting, deleteCursorAcknowledge, deleteCursorAcknowledgeTransactional, deleteDuplicateID, deleteDuplicateIDTransactional, deleteGrouping, deleteHeuristicCompletion, deleteID, deleteIncrementRecord, deleteMessage, deletePageComplete, deletePageCounter, deletePageTransactional, deletePendingPageCounter, deleteQueueBinding, deleteSecurityRoles, generateID, getBindingsJournal, getContext, getCurrentID, getIDGenerator, getMessageJournal, getSingleThreadExecutor, isStarted, lineUpContext, loadBindingJournal, loadInternalOnly, loadMessageJournal, md5, newBindingEncoding, newContext, newSecurityRecord, newSingleThreadContext, persistIdGenerator, prepare, readLock, readUnLock, recoverAddressSettings, recoverPersistedRoles, rollback, rollbackBindings, setContext, start, storeAcknowledge, storeAcknowledgeTransactional, storeAddressSetting, storeCursorAcknowledge, storeCursorAcknowledgeTransactional, storeDuplicateID, storeDuplicateIDTransactional, storeHeuristicCompletion, storeID, storeMessage, storeMessageTransactional, storePageCompleteTransactional, storePageCounter, storePageCounterInc, storePageCounterInc, storePageTransaction, storePendingCounter, storeReference, storeReferenceTransactional, storeSecurityRoles, updateDeliveryCount, updateDuplicateIDTransactional, updatePageTransaction, updatePageTransaction, updateScheduledDeliveryTime, updateScheduledDeliveryTimeTransactional, waitOnOperations, waitOnOperationsprotected String largeMessagesDirectory
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory)
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory, IOCriticalErrorListener criticalErrorListener)
protected void init(Configuration config, IOCriticalErrorListener criticalErrorListener)
AbstractJournalStorageManagerinit in class AbstractJournalStorageManagerprotected void beforeStart()
throws Exception
beforeStart in class AbstractJournalStorageManagerExceptionprotected void beforeStop()
throws Exception
beforeStop in class AbstractJournalStorageManagerExceptionpublic void stop()
throws Exception
stop in interface ActiveMQComponentstop in class AbstractJournalStorageManagerExceptionpublic boolean isReplicated()
public void stop(boolean ioCriticalError)
throws Exception
stop in interface StorageManagerstop in class AbstractJournalStorageManagerioCriticalError - is the server being stopped due to an IO critical errorExceptionprotected void performCachedLargeMessageDeletes()
performCachedLargeMessageDeletes in class AbstractJournalStorageManagerprotected SequentialFile createFileForLargeMessage(long messageID, boolean durable)
protected LargeServerMessage parseLargeMessage(Map<Long,ServerMessage> messages, ActiveMQBuffer buff) throws Exception
parseLargeMessage in class AbstractJournalStorageManagerExceptionpublic void pageClosed(SimpleString storeName, int pageNumber)
public void pageDeleted(SimpleString storeName, int pageNumber)
public void pageWrite(PagedMessage message, int pageNumber)
public ByteBuffer allocateDirectBuffer(int size)
StorageManagerpublic void freeDirectBuffer(ByteBuffer buffer)
StorageManagerpublic long storePendingLargeMessage(long messageID)
throws Exception
Exceptionpublic LargeServerMessage createLargeMessage()
public LargeServerMessage createLargeMessage(long id, MessageInternal message) throws Exception
StorageManagermessage - This is a temporary message that holds the parsed properties. The remoting
layer can't create a ServerMessage directly, then this will be replaced.Exceptionpublic SequentialFile createFileForLargeMessage(long messageID, StorageManager.LargeMessageExtension extension)
StorageManagerLargeServerMessage.messageID - the id of the messageextension - the extension to add to the filepublic void startReplication(ReplicationManager replicationManager, PagingManager pagingManager, String nodeID, boolean autoFailBack, long initialReplicationSyncTimeout) throws Exception
public void stopReplication()
public final void addBytesToLargeMessage(SequentialFile file, long messageId, byte[] bytes) throws Exception
ExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.