public class PageCursorProviderImpl extends Object implements PageCursorProvider
Constructor and Description |
---|
PageCursorProviderImpl(PagingStore pagingStore,
StorageManager storageManager,
Executor executor,
int maxCacheSize) |
Modifier and Type | Method and Description |
---|---|
void |
addPageCache(PageCache cache) |
void |
cleanup() |
void |
close(PageSubscription cursor) |
protected PageCacheImpl |
createPageCache(long pageId) |
PageSubscription |
createSubscription(long cursorID,
Filter filter,
boolean persistent) |
void |
flushExecutors() |
PagingStore |
getAssociatedStore() |
int |
getCacheMaxSize() |
int |
getCacheSize() |
PagedMessage |
getMessage(PagePosition pos) |
PageCache |
getPageCache(long pageId) |
PageCache |
getPageCache(PagePosition pos)
No need to synchronize this method since the private getPageCache will have a synchronized call
|
PageSubscription |
getSubscription(long cursorID) |
PagedReference |
newReference(PagePosition pos,
PagedMessage msg,
PageSubscription subscription) |
void |
printDebug() |
void |
processReload() |
void |
scheduleCleanup() |
void |
setCacheMaxSize(int size) |
void |
stop() |
protected void |
storePositions(ArrayList<PageSubscription> cursorList,
Page currentPage) |
public PageCursorProviderImpl(PagingStore pagingStore, StorageManager storageManager, Executor executor, int maxCacheSize)
public PagingStore getAssociatedStore()
getAssociatedStore
in interface PageCursorProvider
public PageSubscription createSubscription(long cursorID, Filter filter, boolean persistent)
createSubscription
in interface PageCursorProvider
public PageSubscription getSubscription(long cursorID)
getSubscription
in interface PageCursorProvider
cursorID
- The cursorID should be the same as the queueId associated for persistancepublic PagedMessage getMessage(PagePosition pos) throws Exception
getMessage
in interface PageCursorProvider
Exception
public PagedReference newReference(PagePosition pos, PagedMessage msg, PageSubscription subscription)
newReference
in interface PageCursorProvider
public PageCache getPageCache(PagePosition pos)
getPageCache
in interface PageCursorProvider
public PageCache getPageCache(long pageId)
public void addPageCache(PageCache cache)
addPageCache
in interface PageCursorProvider
public int getCacheMaxSize()
getCacheMaxSize
in interface PageCursorProvider
public void setCacheMaxSize(int size)
setCacheMaxSize
in interface PageCursorProvider
public int getCacheSize()
getCacheSize
in interface PageCursorProvider
public void processReload() throws Exception
processReload
in interface PageCursorProvider
Exception
public void stop()
stop
in interface PageCursorProvider
public void flushExecutors()
flushExecutors
in interface PageCursorProvider
public void close(PageSubscription cursor)
close
in interface PageCursorProvider
public void scheduleCleanup()
scheduleCleanup
in interface PageCursorProvider
public void cleanup()
cleanup
in interface PageCursorProvider
protected void storePositions(ArrayList<PageSubscription> cursorList, Page currentPage) throws Exception
cursorList
- currentPage
- Exception
public void printDebug()
printDebug
in interface PageCursorProvider
protected PageCacheImpl createPageCache(long pageId) throws Exception
Exception
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.