P
- The type of the page to be storedpublic abstract class AbstractCachingPageStore<P> extends AbstractPageStore
IPageStore
that uses
SecondLevelPageCache
to cache the stored pages in memoryModifier and Type | Field and Description |
---|---|
protected SecondLevelPageCache<String,Integer,P> |
pagesCache
The cache implementation
|
dataStore, pageSerializer
Modifier | Constructor and Description |
---|---|
protected |
AbstractCachingPageStore(ISerializer pageSerializer,
IDataStore dataStore,
SecondLevelPageCache<String,Integer,P> pagesCache)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the store.
|
IManageablePage |
getPage(String sessionId,
int pageId)
Restores a page from the persistent layer.
|
void |
removePage(String sessionId,
int pageId)
Removes a page from the persistent layer.
|
void |
storePage(String sessionId,
IManageablePage page)
Stores the page to a persistent layer.
|
void |
unbind(String sessionId)
The page store should cleanup all the pages for that sessionid.
|
deserializePage, getPageData, prepareForSerialization, removePageData, removePageData, restoreAfterSerialization, serializePage, storePageData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canBeAsynchronous, convertToPage
protected final SecondLevelPageCache<String,Integer,P> pagesCache
protected AbstractCachingPageStore(ISerializer pageSerializer, IDataStore dataStore, SecondLevelPageCache<String,Integer,P> pagesCache)
pageSerializer
- The serializer that will convert pages to/from byte[]dataStore
- The third level page cachepagesCache
- The cache to use as a second level storepublic IManageablePage getPage(String sessionId, int pageId)
IPageStore
sessionId
- The session of the page that must be removedpageId
- The id of the page.public void removePage(String sessionId, int pageId)
IPageStore
sessionId
- The session of the page that must be removedpageId
- The id of the page.public void storePage(String sessionId, IManageablePage page)
IPageStore
sessionId
- The session of the page that must be removedpage
- The page to storepublic void unbind(String sessionId)
IPageStore
sessionId
- The session of the page that must be removedpublic void destroy()
IPageStore
destroy
in interface IPageStore
destroy
in class AbstractPageStore
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.