public interface PagingStore extends HornetQComponent
The implementation will take care of details such as PageSize.
The producers will write directly to PagingStore, and the store will decide what Page file should be used based on configured size.
PagingManager
Modifier and Type | Method and Description |
---|---|
void |
addSize(int size) |
void |
applySetting(AddressSettings addressSettings) |
boolean |
checkMemory(Runnable runnable) |
boolean |
checkPageFileExists(int page) |
Page |
createPage(int page) |
Page |
depage()
Remove the first page from the Writing Queue.
|
void |
disableCleanup()
This method will disable cleanup of pages.
|
void |
enableCleanup()
This method will re-enable cleanup of pages.
|
void |
flushExecutors()
This is used mostly by tests.
|
void |
forceAnotherPage() |
SimpleString |
getAddress() |
AddressFullMessagePolicy |
getAddressFullMessagePolicy() |
long |
getAddressSize() |
Collection<Integer> |
getCurrentIds()
Files to synchronize with a remote backup.
|
Page |
getCurrentPage() |
int |
getCurrentWritingPage()
Returns the page id of the current page in which the system is writing files.
|
PageCursorProvider |
getCursorProvider() |
long |
getFirstPage() |
String |
getFolder() |
long |
getMaxSize() |
int |
getNumberOfPages() |
long |
getPageSizeBytes() |
PagingManager |
getPagingManager() |
SimpleString |
getStoreName() |
void |
ioSync()
Performs a real sync on the current IO file.
|
boolean |
isPaging() |
boolean |
lock(long timeout)
Write lock the PagingStore.
|
boolean |
page(ServerMessage message,
Transaction tx,
RouteContextList listCtx,
ReentrantReadWriteLock.ReadLock readLock)
Write message to page if we are paging.
|
void |
processReload() |
void |
sendPages(ReplicationManager replicator,
Collection<Integer> pageIds)
Sends the pages with given IDs to the
ReplicationManager . |
boolean |
startPaging() |
void |
stopPaging() |
void |
sync()
Schedules sync to the file storage.
|
void |
unlock()
Releases locks acquired with
lock(long) . |
isStarted, start, stop
SimpleString getAddress()
int getNumberOfPages()
int getCurrentWritingPage()
SimpleString getStoreName()
String getFolder()
AddressFullMessagePolicy getAddressFullMessagePolicy()
long getFirstPage()
long getPageSizeBytes()
long getAddressSize()
long getMaxSize()
void applySetting(AddressSettings addressSettings)
boolean isPaging()
void ioSync() throws Exception
Exception
boolean page(ServerMessage message, Transaction tx, RouteContextList listCtx, ReentrantReadWriteLock.ReadLock readLock) throws Exception
readLock
- a read lock from the storage manager. This is an encapsulation violation made
to keep the code less complex. If give null
the method will throw a
NullPointerException
true
if we are paging and have handled the data, false
if the data
needs to be sent to the journalNullPointerException
- if readLock
is nullException
PagingManager getPagingManager()
PageCursorProvider getCursorProvider()
Page depage() throws Exception
Exception
- Note: This should still be part of the interface, even though HornetQ only uses through thePage getCurrentPage()
boolean startPaging() throws Exception
Exception
void addSize(int size)
boolean checkMemory(Runnable runnable)
boolean lock(long timeout)
timeout
- milliseconds to wait for the lock. If value is -1 then wait
indefinitely.true
if the lock was obtained, false
otherwisevoid unlock()
lock(long)
.void flushExecutors()
Collection<Integer> getCurrentIds() throws Exception
Exception
void sendPages(ReplicationManager replicator, Collection<Integer> pageIds) throws Exception
ReplicationManager
.
Sending is done here to avoid exposing the internal SequentialFile
s.replicator
- pageIds
- Exception
void disableCleanup()
void enableCleanup()
Copyright © 2018 JBoss by Red Hat. All rights reserved.