public class PagingStoreImpl extends Object implements TestSupportPageStore
PagingStore| Modifier and Type | Field and Description |
|---|---|
protected boolean |
syncNonTransactional |
| Constructor and Description |
|---|
PagingStoreImpl(SimpleString address,
ScheduledExecutorService scheduledExecutor,
long syncTimeout,
PagingManager pagingManager,
StorageManager storageManager,
SequentialFileFactory fileFactory,
PagingStoreFactory storeFactory,
SimpleString storeName,
AddressSettings addressSettings,
Executor executor,
boolean syncNonTransactional) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSize(int size) |
void |
applySetting(AddressSettings addressSettings) |
boolean |
checkPage(int pageNumber) |
Page |
createPage(int pageNumber) |
Page |
depage()
It returns a Page out of the Page System without reading it.
|
void |
executeRunnableWhenMemoryAvailable(Runnable runnable) |
void |
flushExecutors()
This is used mostly by tests.
|
void |
forceAnotherPage() |
SimpleString |
getAddress() |
AddressFullMessagePolicy |
getAddressFullMessagePolicy() |
long |
getAddressSize() |
Page |
getCurrentPage() |
int |
getCurrentWritingPage() |
PageCursorProvider |
getCursorProvier() |
long |
getFirstPage() |
String |
getFolder() |
long |
getMaxSize() |
int |
getNumberOfPages() |
long |
getPageSizeBytes() |
PagingManager |
getPagingManager() |
SimpleString |
getStoreName() |
long |
getTopPage() |
void |
ioSync() |
boolean |
isPaging() |
boolean |
isStarted() |
void |
lock()
This method will hold and producer, but it wait operations to finish before locking (write lock)
|
boolean |
page(ServerMessage message,
RoutingContext ctx) |
boolean |
page(ServerMessage message,
RoutingContext ctx,
RouteContextList listCtx) |
protected boolean |
page(ServerMessage message,
RoutingContext ctx,
RouteContextList listCtx,
boolean sync) |
void |
processReload() |
void |
start() |
boolean |
startPaging() |
void |
stop() |
void |
stopPaging() |
void |
sync() |
String |
toString() |
void |
unlock()
Call this method using the same thread used by the last call of
PagingStore.lock() |
public PagingStoreImpl(SimpleString address, ScheduledExecutorService scheduledExecutor, long syncTimeout, PagingManager pagingManager, StorageManager storageManager, SequentialFileFactory fileFactory, PagingStoreFactory storeFactory, SimpleString storeName, AddressSettings addressSettings, Executor executor, boolean syncNonTransactional)
public void applySetting(AddressSettings addressSettings)
applySetting in interface PagingStoreaddressSettings - public void lock()
PagingStorelock in interface PagingStorepublic void unlock()
PagingStorePagingStore.lock()unlock in interface PagingStorepublic PageCursorProvider getCursorProvier()
getCursorProvier in interface PagingStorepublic long getFirstPage()
getFirstPage in interface PagingStorepublic long getTopPage()
getTopPage in interface PagingStorepublic SimpleString getAddress()
getAddress in interface PagingStorepublic long getAddressSize()
getAddressSize in interface PagingStorepublic long getMaxSize()
getMaxSize in interface PagingStorepublic AddressFullMessagePolicy getAddressFullMessagePolicy()
getAddressFullMessagePolicy in interface PagingStorepublic long getPageSizeBytes()
getPageSizeBytes in interface PagingStorepublic String getFolder()
getFolder in interface PagingStorepublic boolean isPaging()
isPaging in interface PagingStorepublic int getNumberOfPages()
getNumberOfPages in interface PagingStorepublic int getCurrentWritingPage()
getCurrentWritingPage in interface PagingStorepublic SimpleString getStoreName()
getStoreName in interface PagingStorepublic boolean page(ServerMessage message, RoutingContext ctx) throws Exception
page in interface PagingStoreExceptionpublic boolean page(ServerMessage message, RoutingContext ctx, RouteContextList listCtx) throws Exception
page in interface PagingStoreExceptionpublic void sync()
throws Exception
sync in interface PagingStoreExceptionpublic void ioSync()
throws Exception
ioSync in interface PagingStoreExceptionpublic void processReload()
throws Exception
processReload in interface PagingStoreExceptionpublic PagingManager getPagingManager()
getPagingManager in interface PagingStorepublic boolean isStarted()
isStarted in interface HornetQComponentpublic void stop()
throws Exception
stop in interface HornetQComponentExceptionpublic void flushExecutors()
PagingStoreflushExecutors in interface PagingStorepublic void start()
throws Exception
start in interface HornetQComponentExceptionpublic void stopPaging()
stopPaging in interface PagingStorepublic boolean startPaging()
startPaging in interface PagingStorepublic Page getCurrentPage()
getCurrentPage in interface PagingStorepublic boolean checkPage(int pageNumber)
checkPage in interface PagingStorepublic Page createPage(int pageNumber) throws Exception
createPage in interface PagingStoreExceptionpublic void forceAnotherPage()
throws Exception
forceAnotherPage in interface PagingStoreExceptionpublic Page depage() throws Exception
depage in interface PagingStoreException - Note: This should still be part of the interface, even though HornetQ only uses through thepublic void executeRunnableWhenMemoryAvailable(Runnable runnable)
executeRunnableWhenMemoryAvailable in interface PagingStorepublic void addSize(int size)
addSize in interface PagingStoreprotected boolean page(ServerMessage message, RoutingContext ctx, RouteContextList listCtx, boolean sync) throws Exception
ExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.