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 PagingStore
addressSettings
- public void lock()
PagingStore
lock
in interface PagingStore
public void unlock()
PagingStore
PagingStore.lock()
unlock
in interface PagingStore
public PageCursorProvider getCursorProvier()
getCursorProvier
in interface PagingStore
public long getFirstPage()
getFirstPage
in interface PagingStore
public long getTopPage()
getTopPage
in interface PagingStore
public SimpleString getAddress()
getAddress
in interface PagingStore
public long getAddressSize()
getAddressSize
in interface PagingStore
public long getMaxSize()
getMaxSize
in interface PagingStore
public AddressFullMessagePolicy getAddressFullMessagePolicy()
getAddressFullMessagePolicy
in interface PagingStore
public long getPageSizeBytes()
getPageSizeBytes
in interface PagingStore
public String getFolder()
getFolder
in interface PagingStore
public boolean isPaging()
isPaging
in interface PagingStore
public int getNumberOfPages()
getNumberOfPages
in interface PagingStore
public int getCurrentWritingPage()
getCurrentWritingPage
in interface PagingStore
public SimpleString getStoreName()
getStoreName
in interface PagingStore
public boolean page(ServerMessage message, RoutingContext ctx) throws Exception
page
in interface PagingStore
Exception
public boolean page(ServerMessage message, RoutingContext ctx, RouteContextList listCtx) throws Exception
page
in interface PagingStore
Exception
public void sync() throws Exception
sync
in interface PagingStore
Exception
public void ioSync() throws Exception
ioSync
in interface PagingStore
Exception
public void processReload() throws Exception
processReload
in interface PagingStore
Exception
public PagingManager getPagingManager()
getPagingManager
in interface PagingStore
public boolean isStarted()
isStarted
in interface HornetQComponent
public void stop() throws Exception
stop
in interface HornetQComponent
Exception
public void flushExecutors()
PagingStore
flushExecutors
in interface PagingStore
public void start() throws Exception
start
in interface HornetQComponent
Exception
public void stopPaging()
stopPaging
in interface PagingStore
public boolean startPaging()
startPaging
in interface PagingStore
public Page getCurrentPage()
getCurrentPage
in interface PagingStore
public boolean checkPage(int pageNumber)
checkPage
in interface PagingStore
public Page createPage(int pageNumber) throws Exception
createPage
in interface PagingStore
Exception
public void forceAnotherPage() throws Exception
forceAnotherPage
in interface PagingStore
Exception
public Page depage() throws Exception
depage
in interface PagingStore
Exception
- Note: This should still be part of the interface, even though HornetQ only uses through thepublic void executeRunnableWhenMemoryAvailable(Runnable runnable)
executeRunnableWhenMemoryAvailable
in interface PagingStore
public void addSize(int size)
addSize
in interface PagingStore
protected boolean page(ServerMessage message, RoutingContext ctx, RouteContextList listCtx, boolean sync) throws Exception
Exception
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.