List of usage examples for org.apache.wicket.pageStore DiskDataStore DiskDataStore
public DiskDataStore(final String applicationName, final File fileStoreFolder, final Bytes maxSizePerSession)
From source file:de.alpharogroup.wicket.base.application.BaseWebApplication.java
License:Apache License
/** * Factory method that can be overwritten to provide an application data store. Here the default * will be returned.// www .j av a 2 s.co m * * For instance: * * <pre> * public void init() { * ... * getStoreSettings().setInmemoryCacheSize(30); * * setPageManagerProvider(new DefaultPageManagerProvider(this) * { * @Override * protected IDataStore newDataStore() * { * return newApplicationDataStore(); * } * }); * ... * } * </pre> * * @return the IDataStore. */ protected IDataStore newApplicationDataStore() { final StoreSettings storeSettings = getStoreSettings(); final Bytes maxSizePerSession = storeSettings.getMaxSizePerSession(); final File fileStoreFolder = storeSettings.getFileStoreFolder(); return new DiskDataStore(this.getName(), fileStoreFolder, maxSizePerSession); }