Package org.apache.wicket.settings
Class StoreSettings
java.lang.Object
org.apache.wicket.settings.StoreSettings
A class for settings related to the the storages where page instances are persisted, used by
IPageStore
IPageManager
.
For more information about page storages read Page Storage - Wiki page
- Since:
- 1.5
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
setAsynchronous
(boolean async) Sets a flag whether to wrap the configuredIPageStore
withAsynchronousPageStore
.setAsynchronousQueueCapacity
(int queueCapacity) Sets the capacity of the queue used to store the pages which will be stored asynchronouslysetCrypter
(Supplier<ICrypter> crypter) Sets the supplier for theICrypter
used by aCryptingPageStore
.setEncrypted
(boolean encrypted) Sets a flag whether to wrap the configuredIPageStore
withCryptingPageStore
.setFileStoreFolder
(File fileStoreFolder) Sets the folder whereDiskPageStore
will store the files with page instances per sessionsetMaxSizePerSession
(Bytes maxSizePerSession) Sets the maximum size of theFile
where page instances per session are stored.
-
Constructor Details
-
StoreSettings
Construct.- Parameters:
application
-
-
-
Method Details
-
getMaxSizePerSession
- Returns:
- maximum page size. After this size is exceeded,
the
DiskPageStore
will start saving the pages at the beginning of file.
-
setMaxSizePerSession
Sets the maximum size of theFile
where page instances per session are stored. After reaching this size theDiskPageStore
will start overriding the oldest pages at the beginning of the file.- Parameters:
maxSizePerSession
- the maximum size of the file where page instances are stored per session. In bytes.- Returns:
this
object for chaining
-
getFileStoreFolder
- Returns:
- the location of the folder where
DiskPageStore
will store the files with page instances per session
-
setFileStoreFolder
Sets the folder whereDiskPageStore
will store the files with page instances per session- Parameters:
fileStoreFolder
- the new location- Returns:
this
object for chaining
-
getAsynchronousQueueCapacity
- Returns:
- the capacity of the queue used to store the pages which will be stored asynchronously
- See Also:
-
setAsynchronousQueueCapacity
Sets the capacity of the queue used to store the pages which will be stored asynchronously- Parameters:
queueCapacity
- the capacity of the queue- Returns:
this
object for chaining- See Also:
-
setAsynchronous
Sets a flag whether to wrap the configuredIPageStore
withAsynchronousPageStore
. By doing this the HTTP worker thread will not wait for the actual write of the page's bytes into the wrappedIPageStore
.- Parameters:
async
-true
to make it asynchronous,false
- otherwise- Returns:
this
object for chaining
-
isAsynchronous
- Returns:
true
if the storing of page is asynchronous
-
setEncrypted
Sets a flag whether to wrap the configuredIPageStore
withCryptingPageStore
.- Parameters:
encrypted
-true
to encrypt,false
- otherwise- Returns:
this
object for chaining
-
isEncrypted
- Returns:
true
if the storing of page is encrypted
-
setCrypter
Sets the supplier for theICrypter
used by aCryptingPageStore
.- Parameters:
crypter
- The new supplier for anICrypter
.- Returns:
this
object for chaining
-
getCrypter
- Returns:
- the supplier used to create a
ICrypter
for aCryptingPageStore
. The default isDefaultCrypter
.
-