java.lang.Object
org.apache.wicket.pageStore.AbstractPersistentPageStore
org.apache.wicket.pageStore.InMemoryPageStore
- All Implemented Interfaces:
IPageStore
,IPersistentPageStore
A storage of pages in memory.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Limit pages by count.static interface
Pages kept in memory for a session.protected static class
List based implementation.protected static class
Limit pages by size.Nested classes/interfaces inherited from class org.apache.wicket.pageStore.AbstractPersistentPageStore
AbstractPersistentPageStore.PersistedPage
-
Constructor Summary
ModifierConstructorDescriptionInMemoryPageStore
(String applicationName, int maxPages) KeepmaxPages
for each session.protected
InMemoryPageStore
(String applicationName, Supplier<InMemoryPageStore.IMemoryData> dataCreator, Map<String, InMemoryPageStore.IMemoryData> datas) InMemoryPageStore
(String applicationName, Bytes maxBytes) Keep page up tomaxBytes
for each session. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPersistedPage
(String sessionIdentifier, IManageablePage page) Add a page.protected IManageablePage
getPersistedPage
(String sessionIdentifier, int id) getPersistedPages
(String sessionIdentifier) Get information about all persisted pages with the given session identifier.Get the identifiers for all stored sessions.protected long
getSize
(IManageablePage page) Get the size of the given page.Get total size of all pages stored in all contexts.protected void
removeAllPersistedPages
(String sessionIdentifier) protected void
removePersistedPage
(String sessionIdentifier, IManageablePage page) boolean
Versioning is not supported.Methods inherited from class org.apache.wicket.pageStore.AbstractPersistentPageStore
addPage, canBeAsynchronous, createSessionIdentifier, destroy, getPage, getSessionIdentifier, removeAllPages, removePage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.pageStore.IPageStore
addPage, canBeAsynchronous, destroy, detach, end, getPage, removeAllPages, removePage, revertPage
Methods inherited from interface org.apache.wicket.pageStore.IPersistentPageStore
getSessionIdentifier
-
Constructor Details
-
InMemoryPageStore
KeepmaxPages
for each session.- Parameters:
applicationName
-Application.getName()
maxPages
- max pages per session
-
InMemoryPageStore
Keep page up tomaxBytes
for each session.All pages added to this store must be
SerializedPage
s. You can achieve this by letting aSerializingPageStore
delegate to this store.- Parameters:
applicationName
-Application.getName()
maxBytes
- maximum bytes to keep in session
-
InMemoryPageStore
protected InMemoryPageStore(String applicationName, Supplier<InMemoryPageStore.IMemoryData> dataCreator, Map<String, InMemoryPageStore.IMemoryData> datas) - Parameters:
applicationName
-Application.getName()
dataCreator
- creator of new datadatas
- storage for datas
-
-
Method Details
-
supportsVersioning
Versioning is not supported.- Specified by:
supportsVersioning
in interfaceIPageStore
-
getPersistedPage
- Specified by:
getPersistedPage
in classAbstractPersistentPageStore
-
removePersistedPage
- Specified by:
removePersistedPage
in classAbstractPersistentPageStore
-
removeAllPersistedPages
- Specified by:
removeAllPersistedPages
in classAbstractPersistentPageStore
-
addPersistedPage
Description copied from class:AbstractPersistentPageStore
Add a page.- Specified by:
addPersistedPage
in classAbstractPersistentPageStore
- Parameters:
sessionIdentifier
- identifier of sessionpage
- page to add
-
getSessionIdentifiers
Description copied from interface:IPersistentPageStore
Get the identifiers for all stored sessions.- Specified by:
getSessionIdentifiers
in interfaceIPersistentPageStore
- Returns:
- the identifiers of all session.
-
getPersistedPages
Description copied from interface:IPersistentPageStore
Get information about all persisted pages with the given session identifier.- Specified by:
getPersistedPages
in interfaceIPersistentPageStore
- Parameters:
sessionIdentifier
- identifier of the session.- Returns:
- all persisted pages
-
getTotalSize
Description copied from interface:IPersistentPageStore
Get total size of all pages stored in all contexts.Optional operation, may return
null
.- Specified by:
getTotalSize
in interfaceIPersistentPageStore
- Returns:
- total size or
null
-
getSize
Get the size of the given page.
-