public class PageCursorProviderImpl extends Object implements PageCursorProvider
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cleanupEnabled |
protected PagingStore |
pagingStore |
protected AtomicInteger |
scheduledCleanup
As an optimization, avoid subsequent schedules as they are unnecessary
|
protected StorageManager |
storageManager |
| Constructor and Description |
|---|
PageCursorProviderImpl(PagingStore pagingStore,
StorageManager storageManager,
Executor executor,
int maxCacheSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPageCache(PageCache cache) |
void |
cleanup()
Perform the cleanup at the caller's thread (for startup and recovery)
|
protected void |
cleanupComplete(ArrayList<PageSubscription> cursorList) |
void |
clearCache()
Used on tests, to simulate a scenario where the VM cleared space
|
void |
close(PageSubscription cursor) |
protected org.apache.activemq.artemis.core.paging.cursor.impl.PageCacheImpl |
createPageCache(long pageId) |
PageSubscription |
createSubscription(long cursorID,
Filter filter,
boolean persistent) |
void |
disableCleanup() |
protected void |
finishCleanup(ArrayList<Page> depagedPages) |
void |
flushExecutors() |
int |
getCacheSize() |
PagedMessage |
getMessage(PagePosition pos) |
PageCache |
getPageCache(long pageId) |
PageSubscription |
getSubscription(long cursorID) |
PagedReference |
newReference(PagePosition pos,
PagedMessage msg,
PageSubscription subscription) |
protected void |
onDeletePage(Page deletedPage) |
void |
onPageModeCleared()
Delete everything associated with any queue on this address.
|
void |
printDebug() |
void |
processReload() |
void |
resumeCleanup() |
void |
scheduleCleanup() |
void |
setCacheMaxSize(int size) |
void |
stop() |
protected void |
storeBookmark(ArrayList<PageSubscription> cursorList,
Page currentPage) |
String |
toString() |
protected final AtomicInteger scheduledCleanup
protected volatile boolean cleanupEnabled
protected final PagingStore pagingStore
protected final StorageManager storageManager
public PageCursorProviderImpl(PagingStore pagingStore, StorageManager storageManager, Executor executor, int maxCacheSize)
public PageSubscription createSubscription(long cursorID, Filter filter, boolean persistent)
createSubscription in interface PageCursorProviderpublic PageSubscription getSubscription(long cursorID)
getSubscription in interface PageCursorProvidercursorID - The cursorID should be the same as the queueId associated for persistencepublic PagedMessage getMessage(PagePosition pos)
getMessage in interface PageCursorProviderpublic PagedReference newReference(PagePosition pos, PagedMessage msg, PageSubscription subscription)
newReference in interface PageCursorProviderpublic PageCache getPageCache(long pageId)
getPageCache in interface PageCursorProviderpublic void addPageCache(PageCache cache)
addPageCache in interface PageCursorProviderpublic void setCacheMaxSize(int size)
setCacheMaxSize in interface PageCursorProviderpublic int getCacheSize()
getCacheSize in interface PageCursorProviderpublic void clearCache()
PageCursorProviderclearCache in interface PageCursorProviderpublic void processReload()
throws Exception
processReload in interface PageCursorProviderExceptionpublic void stop()
stop in interface PageCursorProviderpublic void flushExecutors()
flushExecutors in interface PageCursorProviderpublic void close(PageSubscription cursor)
close in interface PageCursorProviderpublic void scheduleCleanup()
scheduleCleanup in interface PageCursorProviderpublic void onPageModeCleared()
onPageModeCleared in interface PageCursorProviderpublic void disableCleanup()
disableCleanup in interface PageCursorProviderpublic void resumeCleanup()
resumeCleanup in interface PageCursorProviderpublic void cleanup()
PageCursorProvidercleanup in interface PageCursorProviderprotected void cleanupComplete(ArrayList<PageSubscription> cursorList) throws Exception
Exceptionprotected void storeBookmark(ArrayList<PageSubscription> cursorList, Page currentPage) throws Exception
cursorList - currentPage - Exceptionpublic void printDebug()
printDebug in interface PageCursorProviderCopyright © 2018 JBoss by Red Hat. All rights reserved.