public final class PageSubscriptionImpl extends Object implements PageSubscription
| Modifier and Type | Class and Description |
|---|---|
class |
PageSubscriptionImpl.PageCursorInfo
This will hold information about the pending ACKs towards a page.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ack(PagedReference reference) |
void |
ackTx(Transaction tx,
PagedReference reference) |
void |
addPendingDelivery(PagePosition position) |
void |
bookmark(PagePosition position) |
void |
cleanupEntries(boolean completeDelete)
It will cleanup all the records for completed pages
|
void |
confirmPosition(PagePosition position) |
void |
confirmPosition(Transaction tx,
PagePosition position) |
boolean |
contains(PagedReference ref) |
void |
destroy()
All the data associated with the cursor should go away here
|
void |
disableAutoCleanup() |
void |
enableAutoCleanup() |
void |
flushExecutors()
wait all the scheduled runnables to finish their current execution
|
PageSubscriptionCounter |
getCounter() |
long |
getDeliveredCount() |
long |
getDeliveredSize() |
ArtemisExecutor |
getExecutor() |
long |
getFirstPage() |
long |
getId() |
long |
getMessageCount() |
PageSubscriptionImpl.PageCursorInfo |
getPageInfo(long pageNr) |
PagingStore |
getPagingStore() |
long |
getPersistentSize() |
PageCursorProvider |
getProvider() |
Queue |
getQueue() |
void |
incrementDeliveredSize(long size) |
boolean |
isComplete(long page) |
boolean |
isPaging()
Used as a delegate method to
PagingStore.isPaging() |
boolean |
isPersistent() |
PageIterator |
iterator() |
PageIterator |
iterator(boolean browsing) |
void |
lateDeliveryRollback(PagePosition position) |
void |
notEmpty()
This is a callback to inform the PageSubscription that something was routed, so the empty flag can be cleared
|
void |
onDeletePage(Page deletedPage) |
void |
onPageModeCleared(Transaction tx) |
void |
positionIgnored(PagePosition position)
To be called when the cursor decided to ignore a position.
|
void |
printDebug() |
void |
printDebug(String msg) |
void |
processReload() |
PagedMessage |
queryMessage(PagePosition pos)
To be used to requery the reference case the Garbage Collection removed it from the PagedReference as it's using WeakReferences
|
void |
redeliver(PageIterator iterator,
PagePosition position)
To be used on redeliveries
|
void |
reloadACK(PagePosition position)
Theres no need to synchronize this method as it's only called from journal load on startup
|
boolean |
reloadPageCompletion(PagePosition position)
A page marked as complete will be ignored until it's cleared.
|
void |
reloadPageInfo(long pageNr) |
void |
reloadPreparedACK(Transaction tx,
PagePosition position)
To be used to avoid a redelivery of a prepared ACK after load
|
void |
removePendingDelivery(PagePosition position) |
void |
scheduleCleanupCheck() |
void |
setQueue(Queue queue) |
void |
stop() |
String |
toString() |
public PagingStore getPagingStore()
getPagingStore in interface PageSubscriptionpublic Queue getQueue()
getQueue in interface PageSubscriptionpublic boolean isPaging()
PageSubscriptionPagingStore.isPaging()isPaging in interface PageSubscriptionpublic void setQueue(Queue queue)
setQueue in interface PageSubscriptionpublic void disableAutoCleanup()
disableAutoCleanup in interface PageSubscriptionpublic void enableAutoCleanup()
enableAutoCleanup in interface PageSubscriptionpublic PageCursorProvider getProvider()
public void notEmpty()
PageSubscriptionnotEmpty in interface PageSubscriptionpublic void bookmark(PagePosition position) throws Exception
bookmark in interface PageSubscriptionExceptionpublic long getMessageCount()
getMessageCount in interface PageSubscriptionpublic long getPersistentSize()
getPersistentSize in interface PageSubscriptionpublic PageSubscriptionCounter getCounter()
getCounter in interface PageSubscriptionpublic boolean reloadPageCompletion(PagePosition position) throws Exception
Usually paging is a stream of messages but in certain scenarios (such as a pending prepared TX) we may have big holes on the page streaming, and we will need to ignore such pages on the cursor/subscription.
reloadPageCompletion in interface PageSubscriptionExceptionpublic void scheduleCleanupCheck()
scheduleCleanupCheck in interface PageSubscriptionpublic void onPageModeCleared(Transaction tx) throws Exception
onPageModeCleared in interface PageSubscriptionExceptionpublic void cleanupEntries(boolean completeDelete)
throws Exception
cleanupEntries in interface PageSubscriptionExceptionpublic PageIterator iterator()
iterator in interface PageSubscriptionpublic PageIterator iterator(boolean browsing)
iterator in interface PageSubscriptionpublic void confirmPosition(Transaction tx, PagePosition position) throws Exception
confirmPosition in interface PageSubscriptionExceptionpublic void ackTx(Transaction tx, PagedReference reference) throws Exception
ackTx in interface PageSubscriptionExceptionpublic void ack(PagedReference reference) throws Exception
ack in interface PageSubscriptionExceptionpublic boolean contains(PagedReference ref) throws Exception
contains in interface PageSubscriptionExceptionpublic void confirmPosition(PagePosition position) throws Exception
confirmPosition in interface PageSubscriptionExceptionpublic long getFirstPage()
getFirstPage in interface PageSubscriptionpublic void addPendingDelivery(PagePosition position)
addPendingDelivery in interface PageSubscriptionpublic void removePendingDelivery(PagePosition position)
removePendingDelivery in interface PageSubscriptionpublic void redeliver(PageIterator iterator, PagePosition position)
PageSubscriptionredeliver in interface PageSubscriptionpublic PagedMessage queryMessage(PagePosition pos)
PageSubscriptionqueryMessage in interface PageSubscriptionpublic void reloadACK(PagePosition position)
reloadACK in interface PageSubscriptionpublic void reloadPreparedACK(Transaction tx, PagePosition position)
PageSubscriptionreloadPreparedACK in interface PageSubscriptionpublic void positionIgnored(PagePosition position)
PageSubscriptionpositionIgnored in interface PageSubscriptionpublic void lateDeliveryRollback(PagePosition position)
lateDeliveryRollback in interface PageSubscriptionpublic boolean isComplete(long page)
isComplete in interface PageSubscriptionpublic void destroy()
throws Exception
destroy in interface PageSubscriptionExceptionpublic long getId()
getId in interface PageSubscriptionpublic boolean isPersistent()
isPersistent in interface PageSubscriptionpublic void processReload()
throws Exception
processReload in interface PageSubscriptionExceptionpublic void flushExecutors()
PageSubscriptionflushExecutors in interface PageSubscriptionpublic void stop()
stop in interface PageSubscriptionpublic void printDebug()
printDebug in interface PageSubscriptionpublic void printDebug(String msg)
public void onDeletePage(Page deletedPage) throws Exception
onDeletePage in interface PageSubscriptionExceptionpublic ArtemisExecutor getExecutor()
getExecutor in interface PageSubscriptionpublic void reloadPageInfo(long pageNr)
reloadPageInfo in interface PageSubscriptionpublic PageSubscriptionImpl.PageCursorInfo getPageInfo(long pageNr)
public long getDeliveredCount()
getDeliveredCount in interface PageSubscriptionpublic long getDeliveredSize()
getDeliveredSize in interface PageSubscriptionpublic void incrementDeliveredSize(long size)
incrementDeliveredSize in interface PageSubscriptionCopyright © 2019 JBoss by Red Hat. All rights reserved.