Package org.apache.wicket.settings
Class StoreSettings
- java.lang.Object
-
- org.apache.wicket.settings.StoreSettings
-
public class StoreSettings extends java.lang.ObjectA class for settings related to the the storages where page instances are persisted, used byIPageStoreIPageManager.For more information about page storages read Page Storage - Wiki page
- Since:
- 1.5
-
-
Constructor Summary
Constructors Constructor Description StoreSettings(Application application)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAsynchronousQueueCapacity()java.io.FilegetFileStoreFolder()org.apache.wicket.util.lang.BytesgetMaxSizePerSession()booleanisAsynchronous()booleanisEncrypted()StoreSettingssetAsynchronous(boolean async)Sets a flag whether to wrap the configuredIPageStorewithAsynchronousPageStore.StoreSettingssetAsynchronousQueueCapacity(int queueCapacity)Sets the capacity of the queue used to store the pages which will be stored asynchronouslyStoreSettingssetEncrypted(boolean encrypted)Sets a flag whether to wrap the configuredIPageStorewithCryptingPageStore.StoreSettingssetFileStoreFolder(java.io.File fileStoreFolder)Sets the folder whereDiskPageStorewill store the files with page instances per sessionStoreSettingssetMaxSizePerSession(org.apache.wicket.util.lang.Bytes maxSizePerSession)Sets the maximum size of theFilewhere page instances per session are stored.
-
-
-
Constructor Detail
-
StoreSettings
public StoreSettings(Application application)
Construct.- Parameters:
application-
-
-
Method Detail
-
getMaxSizePerSession
public org.apache.wicket.util.lang.Bytes getMaxSizePerSession()
- Returns:
- maximum page size. After this size is exceeded,
the
DiskPageStorewill start saving the pages at the beginning of file.
-
setMaxSizePerSession
public StoreSettings setMaxSizePerSession(org.apache.wicket.util.lang.Bytes maxSizePerSession)
Sets the maximum size of theFilewhere page instances per session are stored. After reaching this size theDiskPageStorewill 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:
thisobject for chaining
-
getFileStoreFolder
public java.io.File getFileStoreFolder()
- Returns:
- the location of the folder where
DiskPageStorewill store the files with page instances per session
-
setFileStoreFolder
public StoreSettings setFileStoreFolder(java.io.File fileStoreFolder)
Sets the folder whereDiskPageStorewill store the files with page instances per session- Parameters:
fileStoreFolder- the new location- Returns:
thisobject for chaining
-
getAsynchronousQueueCapacity
public int getAsynchronousQueueCapacity()
- Returns:
- the capacity of the queue used to store the pages which will be stored asynchronously
- See Also:
AsynchronousPageStore
-
setAsynchronousQueueCapacity
public StoreSettings setAsynchronousQueueCapacity(int queueCapacity)
Sets the capacity of the queue used to store the pages which will be stored asynchronously- Parameters:
queueCapacity- the capacity of the queue- Returns:
thisobject for chaining- See Also:
AsynchronousPageStore
-
setAsynchronous
public StoreSettings setAsynchronous(boolean async)
Sets a flag whether to wrap the configuredIPageStorewithAsynchronousPageStore. By doing this the HTTP worker thread will not wait for the actual write of the page's bytes into the wrappedIPageStore.- Parameters:
async-trueto make it asynchronous,false- otherwise- Returns:
thisobject for chaining
-
isAsynchronous
public boolean isAsynchronous()
- Returns:
trueif the storing of page is asynchronous
-
setEncrypted
public StoreSettings setEncrypted(boolean encrypted)
Sets a flag whether to wrap the configuredIPageStorewithCryptingPageStore.- Parameters:
encrypted-trueto encrypt,false- otherwise- Returns:
thisobject for chaining
-
isEncrypted
public boolean isEncrypted()
- Returns:
trueif the storing of page is encrypted
-
-