Class PageCursorProviderImpl
java.lang.Object
org.apache.activemq.artemis.core.paging.cursor.impl.PageCursorProviderImpl
- All Implemented Interfaces:
PageCursorProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final PagingStoreprotected booleanprotected final AtomicIntegerAs an optimization, avoid subsequent schedules as they are unnecessaryprotected final StorageManager -
Constructor Summary
ConstructorsConstructorDescriptionPageCursorProviderImpl(PagingStore pagingStore, StorageManager storageManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidcleanup()protected voidcleanupComplete(List<PageSubscription> cursorList) voidclose(PageSubscription cursor) voidvoidvoidcreateSubscription(long cursorID, Filter filter, boolean persistent) voidprotected voidfinishCleanup(List<Page> depagedPages) voidvoidforEachSubscription(Consumer<PageSubscription> consumer) protected longgetSubscription(long cursorID) booleannewReference(PagedMessage msg, PageSubscription subscription) protected voidonDeletePage(Page deletedPage) voidDelete everything associated with any queue on this address.voidvoidvoidstop()protected voidstoreBookmark(List<PageSubscription> cursorList, Page currentPage) toString()
-
Field Details
-
scheduledCleanup
As an optimization, avoid subsequent schedules as they are unnecessary -
cleanupEnabled
protected volatile boolean cleanupEnabled -
rebuildDone
protected volatile boolean rebuildDone -
pagingStore
-
storageManager
-
-
Constructor Details
-
PageCursorProviderImpl
-
-
Method Details
-
createSubscription
- Specified by:
createSubscriptionin interfacePageCursorProvider
-
getSubscription
- Specified by:
getSubscriptionin interfacePageCursorProvider- Parameters:
cursorID- The cursorID should be the same as the queueId associated for persistence
-
forEachSubscription
- Specified by:
forEachSubscriptionin interfacePageCursorProvider
-
newReference
- Specified by:
newReferencein interfacePageCursorProvider
-
processReload
- Specified by:
processReloadin interfacePageCursorProvider- Throws:
Exception
-
stop
public void stop()- Specified by:
stopin interfacePageCursorProvider
-
counterSnapshot
public void counterSnapshot()- Specified by:
counterSnapshotin interfacePageCursorProvider
-
flushExecutors
public void flushExecutors()- Specified by:
flushExecutorsin interfacePageCursorProvider
-
close
- Specified by:
closein interfacePageCursorProvider
-
scheduleCleanup
- Specified by:
scheduleCleanupin interfacePageCursorProvider
-
onPageModeCleared
public void onPageModeCleared()Delete everything associated with any queue on this address. This is to be called when the address is about to be released from paging. Hence the PagingStore will be holding a write lock, meaning no messages are going to be paged at this time. So, we shouldn't lock anything after this method, to avoid dead locks between the writeLock and any synchronization with the CursorProvider.- Specified by:
onPageModeClearedin interfacePageCursorProvider
-
disableCleanup
public void disableCleanup()- Specified by:
disableCleanupin interfacePageCursorProvider
-
resumeCleanup
public void resumeCleanup()- Specified by:
resumeCleanupin interfacePageCursorProvider
-
getNumberOfMessagesOnSubscriptions
protected long getNumberOfMessagesOnSubscriptions() -
checkClearPageLimit
public void checkClearPageLimit()- Specified by:
checkClearPageLimitin interfacePageCursorProvider
-
cleanup
protected void cleanup() -
cleanupComplete
- Throws:
Exception
-
finishCleanup
-
onDeletePage
- Throws:
Exception
-
storeBookmark
- Throws:
Exception
-
toString
-
counterRebuildStarted
public void counterRebuildStarted()- Specified by:
counterRebuildStartedin interfacePageCursorProvider
-
counterRebuildDone
public void counterRebuildDone()- Specified by:
counterRebuildDonein interfacePageCursorProvider
-
isRebuildDone
public boolean isRebuildDone()- Specified by:
isRebuildDonein interfacePageCursorProvider
-