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 PageSubscription
public Queue getQueue()
getQueue
in interface PageSubscription
public boolean isPaging()
PageSubscription
isPaging
in interface PageSubscription
public void setQueue(Queue queue)
setQueue
in interface PageSubscription
public void disableAutoCleanup()
disableAutoCleanup
in interface PageSubscription
public void enableAutoCleanup()
enableAutoCleanup
in interface PageSubscription
public PageCursorProvider getProvider()
public void bookmark(PagePosition position) throws Exception
bookmark
in interface PageSubscription
Exception
public long getMessageCount()
getMessageCount
in interface PageSubscription
public PageSubscriptionCounter getCounter()
getCounter
in interface PageSubscription
public void scheduleCleanupCheck()
scheduleCleanupCheck
in interface PageSubscription
public void cleanupEntries(boolean completeDelete) throws Exception
cleanupEntries
in interface PageSubscription
Exception
public LinkedListIterator<PagedReference> iterator()
iterator
in interface PageSubscription
public void confirmPosition(Transaction tx, PagePosition position) throws Exception
confirmPosition
in interface PageSubscription
Exception
public void ackTx(Transaction tx, PagedReference reference) throws Exception
ackTx
in interface PageSubscription
Exception
public void ack(PagedReference reference) throws Exception
ack
in interface PageSubscription
Exception
public void confirmPosition(PagePosition position) throws Exception
confirmPosition
in interface PageSubscription
Exception
public long getFirstPage()
getFirstPage
in interface PageSubscription
public void addPendingDelivery(PagePosition position)
addPendingDelivery
in interface PageSubscription
public void redeliver(PagePosition position)
PageSubscription
redeliver
in interface PageSubscription
public PagedMessage queryMessage(PagePosition pos)
PageSubscription
queryMessage
in interface PageSubscription
public void reloadACK(PagePosition position)
reloadACK
in interface PageSubscription
public void reloadPreparedACK(Transaction tx, PagePosition position)
PageSubscription
reloadPreparedACK
in interface PageSubscription
public void positionIgnored(PagePosition position)
PageSubscription
positionIgnored
in interface PageSubscription
public void lateDeliveryRollback(PagePosition position)
lateDeliveryRollback
in interface PageSubscription
public boolean isComplete(long page)
isComplete
in interface PageSubscription
public void close() throws Exception
close
in interface PageSubscription
Exception
public long getId()
getId
in interface PageSubscription
public boolean isPersistent()
isPersistent
in interface PageSubscription
public void processReload() throws Exception
processReload
in interface PageSubscription
Exception
public void flushExecutors()
PageSubscription
flushExecutors
in interface PageSubscription
public void stop()
stop
in interface PageSubscription
public void printDebug()
printDebug
in interface PageSubscription
public void printDebug(String msg)
public Executor getExecutor()
getExecutor
in interface PageSubscription
protected boolean match(ServerMessage message)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.