public class PageSubscriptionImpl extends Object implements PageSubscription
| Constructor and Description |
|---|
PageSubscriptionImpl(PageCursorProvider cursorProvider,
PagingStore pageStore,
StorageManager store,
Executor executor,
Filter filter,
long cursorId,
boolean persistent) |
| 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 |
close()
All the data associated with the cursor should go away here
|
void |
confirmPosition(PagePosition position) |
void |
confirmPosition(Transaction tx,
PagePosition position) |
void |
disableAutoCleanup() |
void |
enableAutoCleanup() |
void |
flushExecutors()
wait all the scheduled runnables to finish their current execution
|
PageSubscriptionCounter |
getCounter() |
Executor |
getExecutor() |
long |
getFirstPage() |
long |
getId() |
long |
getMessageCount() |
PagingStore |
getPagingStore() |
PageCursorProvider |
getProvider() |
Queue |
getQueue() |
boolean |
isComplete(long page) |
boolean |
isPaging()
Used as a delegate method to pageStore.isPaging()
|
boolean |
isPersistent() |
LinkedListIterator<PagedReference> |
iterator() |
void |
lateDeliveryRollback(PagePosition position) |
protected boolean |
match(ServerMessage message) |
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(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
|
void |
reloadPreparedACK(Transaction tx,
PagePosition position)
To be used to avoid a redelivery of a prepared ACK after load
|
void |
scheduleCleanupCheck() |
void |
setQueue(Queue queue) |
void |
stop() |
String |
toString() |
public PageSubscriptionImpl(PageCursorProvider cursorProvider, PagingStore pageStore, StorageManager store, Executor executor, Filter filter, long cursorId, boolean persistent)
public PagingStore getPagingStore()
getPagingStore in interface PageSubscriptionpublic Queue getQueue()
getQueue in interface PageSubscriptionpublic boolean isPaging()
PageSubscriptionisPaging 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 bookmark(PagePosition position) throws Exception
bookmark in interface PageSubscriptionExceptionpublic long getMessageCount()
getMessageCount in interface PageSubscriptionpublic PageSubscriptionCounter getCounter()
getCounter in interface PageSubscriptionpublic void scheduleCleanupCheck()
scheduleCleanupCheck in interface PageSubscriptionpublic void cleanupEntries(boolean completeDelete)
throws Exception
cleanupEntries in interface PageSubscriptionExceptionpublic LinkedListIterator<PagedReference> iterator()
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 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 redeliver(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 close()
throws Exception
close 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 Executor getExecutor()
getExecutor in interface PageSubscriptionprotected boolean match(ServerMessage message)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.