public class JournalStorageManager extends AbstractJournalStorageManager
AbstractJournalStorageManager.JournalContent
StorageManager.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, waitOnOperations
protected String largeMessagesDirectory
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory)
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory, IOCriticalErrorListener criticalErrorListener)
protected void init(Configuration config, IOCriticalErrorListener criticalErrorListener)
AbstractJournalStorageManager
init
in class AbstractJournalStorageManager
protected void beforeStart() throws Exception
beforeStart
in class AbstractJournalStorageManager
Exception
protected void beforeStop() throws Exception
beforeStop
in class AbstractJournalStorageManager
Exception
public void stop() throws Exception
stop
in interface ActiveMQComponent
stop
in class AbstractJournalStorageManager
Exception
public boolean isReplicated()
public void stop(boolean ioCriticalError) throws Exception
stop
in interface StorageManager
stop
in class AbstractJournalStorageManager
ioCriticalError
- is the server being stopped due to an IO critical errorException
protected void performCachedLargeMessageDeletes()
performCachedLargeMessageDeletes
in class AbstractJournalStorageManager
protected SequentialFile createFileForLargeMessage(long messageID, boolean durable)
protected LargeServerMessage parseLargeMessage(Map<Long,ServerMessage> messages, ActiveMQBuffer buff) throws Exception
parseLargeMessage
in class AbstractJournalStorageManager
Exception
public 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)
StorageManager
public void freeDirectBuffer(ByteBuffer buffer)
StorageManager
public long storePendingLargeMessage(long messageID) throws Exception
Exception
public LargeServerMessage createLargeMessage()
public LargeServerMessage createLargeMessage(long id, MessageInternal message) throws Exception
StorageManager
message
- This is a temporary message that holds the parsed properties. The remoting
layer can't create a ServerMessage directly, then this will be replaced.Exception
public SequentialFile createFileForLargeMessage(long messageID, StorageManager.LargeMessageExtension extension)
StorageManager
LargeServerMessage
.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
Exception
Copyright © 2016 The Apache Software Foundation. All rights reserved.