public interface StorageManager extends HornetQComponent
Modifier and Type | Interface and Description |
---|---|
static class |
StorageManager.LargeMessageExtension |
Modifier and Type | Method and Description |
---|---|
void |
addBytesToLargeMessage(SequentialFile appendFile,
long messageID,
byte[] bytes) |
void |
addGrouping(GroupBinding groupBinding) |
void |
addQueueBinding(long tx,
Binding binding) |
boolean |
addToPage(PagingStore store,
ServerMessage msg,
Transaction tx,
RouteContextList listCtx)
Write message to page if we are paging.
|
void |
afterCompleteOperations(IOAsyncTask run) |
void |
afterPageRead()
We need a safeguard in place to avoid too much concurrent IO happening on Paging, otherwise
the system may become unresponsive if too many destinations are reading all the same time.
|
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.
|
void |
beforePageRead()
We need a safeguard in place to avoid too much concurrent IO happening on Paging, otherwise
the system may become unresponsive if too many destinations are reading all the same time.
|
void |
clearContext() |
void |
commit(long txID) |
void |
commit(long txID,
boolean lineUpContext) |
void |
commitBindings(long txID) |
void |
confirmPendingLargeMessage(long recordID)
Confirms that a large message was finished
|
void |
confirmPendingLargeMessageTX(Transaction transaction,
long messageID,
long recordID)
Confirms that a large message was finished
|
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 |
deleteAddressSetting(SimpleString addressMatch) |
void |
deleteCursorAcknowledge(long ackID) |
void |
deleteCursorAcknowledgeTransactional(long txID,
long ackID) |
void |
deleteDuplicateID(long recordID) |
void |
deleteDuplicateIDTransactional(long txID,
long recordID) |
void |
deleteGrouping(long tx,
GroupBinding groupBinding) |
void |
deleteHeuristicCompletion(long id) |
void |
deleteIncrementRecord(long txID,
long recordID) |
void |
deleteMessage(long messageID) |
void |
deletePageComplete(long ackID) |
void |
deletePageCounter(long txID,
long recordID) |
void |
deletePageTransactional(long recordID) |
void |
deletePendingPageCounter(long txID,
long recordID) |
void |
deleteQueueBinding(long tx,
long queueBindingID) |
void |
deleteSecurityRoles(SimpleString addressMatch) |
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.
|
long |
generateUniqueID() |
Journal |
getBindingsJournal() |
OperationContext |
getContext()
Get the context associated with the thread for later reuse
|
long |
getCurrentUniqueID() |
Journal |
getMessageJournal() |
void |
lineUpContext() |
JournalLoadInformation |
loadBindingJournal(List<QueueBindingInfo> queueBindingInfos,
List<GroupingInfo> groupingInfos) |
JournalLoadInformation |
loadMessageJournal(PostOffice postOffice,
PagingManager pagingManager,
ResourceManager resourceManager,
Map<Long,QueueBindingInfo> queueInfos,
Map<SimpleString,List<Pair<byte[],Long>>> duplicateIDMap,
Set<Pair<Long,Long>> pendingLargeMessages,
List<PageCountPending> pendingNonTXPageCounter,
JournalLoader journalLoader) |
OperationContext |
newContext(Executor executor)
It just creates an OperationContext without associating it
|
OperationContext |
newSingleThreadContext() |
void |
pageClosed(SimpleString storeName,
int pageNumber) |
void |
pageDeleted(SimpleString storeName,
int pageNumber) |
void |
pageWrite(PagedMessage message,
int pageNumber) |
void |
persistIdGenerator()
Closes the
IDGenerator persisting the current record ID. |
void |
prepare(long txID,
Xid xid) |
void |
readLock()
Read lock the StorageManager.
|
void |
readUnLock()
Unlock the manager.
|
List<PersistedAddressSetting> |
recoverAddressSettings() |
List<PersistedRoles> |
recoverPersistedRoles() |
void |
rollback(long txID) |
void |
rollbackBindings(long txID) |
void |
setContext(OperationContext context)
Set the context back to the thread
|
void |
startReplication(ReplicationManager replicationManager,
PagingManager pagingManager,
String nodeID,
boolean autoFailBack) |
void |
stop(boolean ioCriticalError) |
void |
stopReplication()
Stops the replication of data from the live to the backup.
|
void |
storeAcknowledge(long queueID,
long messageID) |
void |
storeAcknowledgeTransactional(long txID,
long queueID,
long messageID) |
void |
storeAddressSetting(PersistedAddressSetting addressSetting) |
void |
storeCursorAcknowledge(long queueID,
PagePosition position) |
void |
storeCursorAcknowledgeTransactional(long txID,
long queueID,
PagePosition position) |
void |
storeDuplicateID(SimpleString address,
byte[] duplID,
long recordID) |
void |
storeDuplicateIDTransactional(long txID,
SimpleString address,
byte[] duplID,
long recordID) |
long |
storeHeuristicCompletion(Xid xid,
boolean isCommit) |
void |
storeID(long journalID,
long id)
Stores the given journalID in the bindingsJournal.
|
void |
storeMessage(ServerMessage message) |
void |
storeMessageTransactional(long txID,
ServerMessage message) |
void |
storePageCompleteTransactional(long txID,
long queueID,
PagePosition position) |
long |
storePageCounter(long txID,
long queueID,
long value) |
long |
storePageCounterInc(long queueID,
int add) |
long |
storePageCounterInc(long txID,
long queueID,
int add) |
void |
storePageTransaction(long txID,
PageTransactionInfo pageTransaction) |
long |
storePendingCounter(long queueID,
long pageID,
int inc) |
void |
storeReference(long queueID,
long messageID,
boolean last) |
void |
storeReferenceTransactional(long txID,
long queueID,
long messageID) |
void |
storeSecurityRoles(PersistedRoles persistedRoles) |
void |
updateDeliveryCount(MessageReference ref) |
void |
updateDuplicateIDTransactional(long txID,
SimpleString address,
byte[] duplID,
long recordID) |
void |
updatePageTransaction(long txID,
PageTransactionInfo pageTransaction,
int depage) |
void |
updatePageTransaction(PageTransactionInfo pageTransaction,
int depage)
FIXME Unused
|
void |
updateScheduledDeliveryTime(MessageReference ref) |
void |
updateScheduledDeliveryTimeTransactional(long txID,
MessageReference ref) |
void |
waitOnOperations()
Block until the operations are done.
|
boolean |
waitOnOperations(long timeout)
Block until the operations are done.
|
isStarted, start, stop
OperationContext getContext()
void lineUpContext()
OperationContext newContext(Executor executor)
OperationContext newSingleThreadContext()
void setContext(OperationContext context)
void stop(boolean ioCriticalError) throws Exception
ioCriticalError
- is the server being stopped due to an IO critical errorException
void pageClosed(SimpleString storeName, int pageNumber)
void pageDeleted(SimpleString storeName, int pageNumber)
void pageWrite(PagedMessage message, int pageNumber)
void afterCompleteOperations(IOAsyncTask run)
boolean waitOnOperations(long timeout) throws Exception
Exception
void waitOnOperations() throws Exception
Exception
void beforePageRead() throws Exception
Exception
void afterPageRead() throws Exception
Exception
ByteBuffer allocateDirectBuffer(int size)
void freeDirectBuffer(ByteBuffer buffer)
void clearContext()
long generateUniqueID()
long getCurrentUniqueID()
void confirmPendingLargeMessageTX(Transaction transaction, long messageID, long recordID) throws Exception
Exception
void confirmPendingLargeMessage(long recordID) throws Exception
Exception
void storeMessage(ServerMessage message) throws Exception
Exception
void storeReference(long queueID, long messageID, boolean last) throws Exception
Exception
void storeAcknowledge(long queueID, long messageID) throws Exception
Exception
void storeCursorAcknowledge(long queueID, PagePosition position) throws Exception
Exception
void updateDeliveryCount(MessageReference ref) throws Exception
Exception
void updateScheduledDeliveryTime(MessageReference ref) throws Exception
Exception
void storeDuplicateID(SimpleString address, byte[] duplID, long recordID) throws Exception
Exception
void storeMessageTransactional(long txID, ServerMessage message) throws Exception
Exception
void storeReferenceTransactional(long txID, long queueID, long messageID) throws Exception
Exception
void storeAcknowledgeTransactional(long txID, long queueID, long messageID) throws Exception
Exception
void storeCursorAcknowledgeTransactional(long txID, long queueID, PagePosition position) throws Exception
Exception
void deleteCursorAcknowledgeTransactional(long txID, long ackID) throws Exception
Exception
void storePageCompleteTransactional(long txID, long queueID, PagePosition position) throws Exception
Exception
void updateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) throws Exception
Exception
void storeDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID) throws Exception
Exception
void updateDuplicateIDTransactional(long txID, SimpleString address, byte[] duplID, long recordID) throws Exception
Exception
void deleteDuplicateIDTransactional(long txID, long recordID) throws Exception
Exception
LargeServerMessage createLargeMessage()
LargeServerMessage createLargeMessage(long id, MessageInternal message) throws Exception
id
- 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
SequentialFile createFileForLargeMessage(long messageID, StorageManager.LargeMessageExtension extension)
LargeServerMessage
.messageID
- the id of the messageextension
- the extension to add to the filevoid storePageTransaction(long txID, PageTransactionInfo pageTransaction) throws Exception
Exception
void updatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depage) throws Exception
Exception
void updatePageTransaction(PageTransactionInfo pageTransaction, int depage) throws Exception
Exception
void deletePageTransactional(long recordID) throws Exception
Exception
JournalLoadInformation loadMessageJournal(PostOffice postOffice, PagingManager pagingManager, ResourceManager resourceManager, Map<Long,QueueBindingInfo> queueInfos, Map<SimpleString,List<Pair<byte[],Long>>> duplicateIDMap, Set<Pair<Long,Long>> pendingLargeMessages, List<PageCountPending> pendingNonTXPageCounter, JournalLoader journalLoader) throws Exception
Exception
long storeHeuristicCompletion(Xid xid, boolean isCommit) throws Exception
Exception
void deleteHeuristicCompletion(long id) throws Exception
Exception
void deleteQueueBinding(long tx, long queueBindingID) throws Exception
Exception
JournalLoadInformation loadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos) throws Exception
Exception
void addGrouping(GroupBinding groupBinding) throws Exception
Exception
void deleteGrouping(long tx, GroupBinding groupBinding) throws Exception
Exception
void storeAddressSetting(PersistedAddressSetting addressSetting) throws Exception
Exception
void deleteAddressSetting(SimpleString addressMatch) throws Exception
Exception
List<PersistedAddressSetting> recoverAddressSettings() throws Exception
Exception
void storeSecurityRoles(PersistedRoles persistedRoles) throws Exception
Exception
void deleteSecurityRoles(SimpleString addressMatch) throws Exception
Exception
List<PersistedRoles> recoverPersistedRoles() throws Exception
Exception
long storePageCounter(long txID, long queueID, long value) throws Exception
Exception
long storePendingCounter(long queueID, long pageID, int inc) throws Exception
Exception
void deleteIncrementRecord(long txID, long recordID) throws Exception
Exception
void deletePageCounter(long txID, long recordID) throws Exception
Exception
void deletePendingPageCounter(long txID, long recordID) throws Exception
Exception
long storePageCounterInc(long txID, long queueID, int add) throws Exception
Exception
long storePageCounterInc(long queueID, int add) throws Exception
Exception
Journal getBindingsJournal()
Journal getMessageJournal()
void startReplication(ReplicationManager replicationManager, PagingManager pagingManager, String nodeID, boolean autoFailBack) throws Exception
Exception
JournalStorageManager#startReplication(ReplicationManager, PagingManager, String,
boolean)
boolean addToPage(PagingStore store, ServerMessage msg, Transaction tx, RouteContextList listCtx) throws Exception
PagingStore
call, but as with any other call writing persistent
data, it must go through here. Both for the sake of replication, and also to ensure that it
takes the locks (storage manager and pagingStore) in the right order. Avoiding thus the
creation of dead-locks.true
if we are paging and have handled the data, false
if the data
needs to be sent to the journalException
void stopReplication()
void addBytesToLargeMessage(SequentialFile appendFile, long messageID, byte[] bytes) throws Exception
appendFile
- messageID
- bytes
- Exception
void storeID(long journalID, long id) throws Exception
journalID
- id
- Exception
void readLock()
void readUnLock()
readLock()
void persistIdGenerator()
IDGenerator
persisting the current record ID.
Effectively a "pre-stop" method. Necessary due to the "stop"-order at
HornetQServerImpl
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.