public class JournalStorageManager extends AbstractJournalStorageManager
AbstractJournalStorageManager.JournalContent
StorageManager.LargeMessageExtension
Modifier and Type | Field and Description |
---|---|
protected String |
largeMessagesDirectory |
bindingsJournal, config, executorFactory, idGenerator, ioExecutors, journalLoaded, largeMessagesToDelete, mapPersistedAddressSettings, mapPersistedRoles, messageJournal, pageMaxConcurrentIO, perfBlastPages, scheduledExecutorService, started, storageManagerLock
Constructor and Description |
---|
JournalStorageManager(Configuration config,
ExecutorFactory executorFactory,
ExecutorFactory ioExecutors) |
JournalStorageManager(Configuration config,
ExecutorFactory executorFactory,
ExecutorFactory ioExecutors,
IOCriticalErrorListener criticalErrorListener) |
JournalStorageManager(Configuration config,
ExecutorFactory executorFactory,
ScheduledExecutorService scheduledExecutorService,
ExecutorFactory ioExecutors) |
JournalStorageManager(Configuration config,
ExecutorFactory executorFactory,
ScheduledExecutorService scheduledExecutorService,
ExecutorFactory ioExecutors,
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.
|
void |
injectMonitor(FileStoreMonitor monitor) |
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,
boolean sendFailover) |
void |
stopReplication()
Stops replication by resetting replication-related fields to their 'unreplicated' state.
|
long |
storePendingLargeMessage(long messageID,
long recordID) |
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, deleteQueueStatus, deleteSecurityRoles, generateID, getBindingsJournal, getContext, getCurrentID, getIDGenerator, getMessageJournal, isStarted, lineUpContext, loadBindingJournal, loadInternalOnly, loadMessageJournal, md5, newBindingEncoding, newContext, newQueueStatusEncoding, 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, storeQueueStatus, storeReference, storeReferenceTransactional, storeSecurityRoles, updateDeliveryCount, updateDuplicateIDTransactional, updatePageTransaction, updatePageTransaction, updateScheduledDeliveryTime, updateScheduledDeliveryTimeTransactional, waitOnOperations, waitOnOperations
protected String largeMessagesDirectory
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutors)
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory, ExecutorFactory ioExecutors)
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutorService, ExecutorFactory ioExecutors, IOCriticalErrorListener criticalErrorListener)
public JournalStorageManager(Configuration config, ExecutorFactory executorFactory, ExecutorFactory ioExecutors, 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, boolean sendFailover) throws Exception
stop
in interface StorageManager
stop
in class AbstractJournalStorageManager
ioCriticalError
- is the server being stopped due to an IO critical error.sendFailover
- this is to send the replication stopping in case of replication.Exception
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, long recordID) 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
public void injectMonitor(FileStoreMonitor monitor) throws Exception
Exception
Copyright © 2017 JBoss by Red Hat. All rights reserved.