org.apache.wicket.settings
Interface IStoreSettings

All Known Implementing Classes:
StoreSettings

public interface IStoreSettings

An interface for settings related to the the storages where page instances are persisted - IPageStore, IDataStore and IPageManager.

For more information about page storages read Page Storage - Wiki page

Since:
1.5

Method Summary
 int getAsynchronousQueueCapacity()
           
 java.io.File getFileStoreFolder()
           
 int getInmemoryCacheSize()
           
 Bytes getMaxSizePerSession()
           
 boolean isAsynchronous()
           
 void setAsynchronous(boolean async)
          Sets a flag whether to wrap the configured IDataStore with AsynchronousDataStore.
 void setAsynchronousQueueCapacity(int capacity)
          Sets the capacity of the queue used to store the pages which will be stored asynchronously
 void setFileStoreFolder(java.io.File fileStoreFolder)
          Sets the folder where DiskDataStore will store the files with page instances per session
 void setInmemoryCacheSize(int inmemoryCacheSize)
          Sets the maximum number of page instances which will be stored in the application scoped second level cache for faster retrieval
 void setMaxSizePerSession(Bytes maxSizePerSession)
          Sets the maximum size of the File where page instances per session are stored.
 

Method Detail

getInmemoryCacheSize

int getInmemoryCacheSize()
Returns:
the number of page instances which will be stored in the application scoped cache for faster retrieval

setInmemoryCacheSize

void setInmemoryCacheSize(int inmemoryCacheSize)
Sets the maximum number of page instances which will be stored in the application scoped second level cache for faster retrieval

Parameters:
inmemoryCacheSize - the maximum number of page instances which will be held in the application scoped cache

getMaxSizePerSession

Bytes getMaxSizePerSession()
Returns:
maximum page size. After this size is exceeded, the DiskDataStore will start saving the pages at the beginning of file.

setMaxSizePerSession

void setMaxSizePerSession(Bytes maxSizePerSession)
Sets the maximum size of the File where page instances per session are stored. After reaching this size the DiskDataStore 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.

getFileStoreFolder

java.io.File getFileStoreFolder()
Returns:
the location of the folder where DiskDataStore will store the files with page instances per session

setFileStoreFolder

void setFileStoreFolder(java.io.File fileStoreFolder)
Sets the folder where DiskDataStore will store the files with page instances per session

Parameters:
fileStoreFolder - the new location

getAsynchronousQueueCapacity

int getAsynchronousQueueCapacity()
Returns:
the capacity of the queue used to store the pages which will be stored asynchronously
See Also:
AsynchronousDataStore

setAsynchronousQueueCapacity

void setAsynchronousQueueCapacity(int capacity)
Sets the capacity of the queue used to store the pages which will be stored asynchronously

Parameters:
capacity - the capacity of the queue
See Also:
AsynchronousDataStore

setAsynchronous

void setAsynchronous(boolean async)
Sets a flag whether to wrap the configured IDataStore with AsynchronousDataStore. By doing this the HTTP worker thread will not wait for the actual write of the page's bytes into the wrapped IDataStore.

Parameters:
async - true to make it asynchronous, false - otherwise

isAsynchronous

boolean isAsynchronous()
Returns:
true if the storing of page's bytes is asynchronous


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.