org.apache.wicket.settings.def
Class StoreSettings

java.lang.Object
  extended by org.apache.wicket.settings.def.StoreSettings
All Implemented Interfaces:
IStoreSettings

public class StoreSettings
extends java.lang.Object
implements IStoreSettings

The implementation of IStoreSettings


Constructor Summary
StoreSettings(Application application)
          Construct.
 
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 queueCapacity)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreSettings

public StoreSettings(Application application)
Construct.

Parameters:
application -
Method Detail

getInmemoryCacheSize

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

setInmemoryCacheSize

public void setInmemoryCacheSize(int inmemoryCacheSize)
Description copied from interface: IStoreSettings
Sets the maximum number of page instances which will be stored in the application scoped second level cache for faster retrieval

Specified by:
setInmemoryCacheSize in interface IStoreSettings
Parameters:
inmemoryCacheSize - the maximum number of page instances which will be held in the application scoped cache

getMaxSizePerSession

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

setMaxSizePerSession

public void setMaxSizePerSession(Bytes maxSizePerSession)
Description copied from interface: IStoreSettings
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.

Specified by:
setMaxSizePerSession in interface IStoreSettings
Parameters:
maxSizePerSession - the maximum size of the file where page instances are stored per session. In bytes.

getFileStoreFolder

public java.io.File getFileStoreFolder()
Specified by:
getFileStoreFolder in interface IStoreSettings
Returns:
the location of the folder where DiskDataStore will store the files with page instances per session

setFileStoreFolder

public void setFileStoreFolder(java.io.File fileStoreFolder)
Description copied from interface: IStoreSettings
Sets the folder where DiskDataStore will store the files with page instances per session

Specified by:
setFileStoreFolder in interface IStoreSettings
Parameters:
fileStoreFolder - the new location

getAsynchronousQueueCapacity

public int getAsynchronousQueueCapacity()
Specified by:
getAsynchronousQueueCapacity in interface IStoreSettings
Returns:
the capacity of the queue used to store the pages which will be stored asynchronously
See Also:
AsynchronousDataStore

setAsynchronousQueueCapacity

public void setAsynchronousQueueCapacity(int queueCapacity)
Description copied from interface: IStoreSettings
Sets the capacity of the queue used to store the pages which will be stored asynchronously

Specified by:
setAsynchronousQueueCapacity in interface IStoreSettings
Parameters:
queueCapacity - the capacity of the queue
See Also:
AsynchronousDataStore

setAsynchronous

public void setAsynchronous(boolean async)
Description copied from interface: IStoreSettings
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.

Specified by:
setAsynchronous in interface IStoreSettings
Parameters:
async - true to make it asynchronous, false - otherwise

isAsynchronous

public boolean isAsynchronous()
Specified by:
isAsynchronous in interface IStoreSettings
Returns:
true if the storing of page's bytes is asynchronous


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