use of org.apache.wicket.pageStore.DefaultPageStore in project wicket by apache.
the class TestApp1 method init.
@Override
protected void init() {
getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel"));
setPageManagerProvider(new DefaultPageManagerProvider(this) {
@Override
public IPageManager get(IPageManagerContext pageManagerContext) {
IDataStore dataStore = new HttpSessionDataStore(pageManagerContext, new PageNumberEvictionStrategy(100));
IPageStore pageStore = new DefaultPageStore(new JavaSerializer(getApplicationKey()), dataStore, getStoreSettings().getInmemoryCacheSize());
return new PageStoreManager(getName(), pageStore, pageManagerContext);
}
});
}
use of org.apache.wicket.pageStore.DefaultPageStore in project wicket by apache.
the class DefaultPageManagerProvider method newPageStore.
protected IPageStore newPageStore(IDataStore dataStore) {
int inmemoryCacheSize = getStoreSettings().getInmemoryCacheSize();
ISerializer pageSerializer = application.getFrameworkSettings().getSerializer();
return new DefaultPageStore(pageSerializer, dataStore, inmemoryCacheSize);
}
use of org.apache.wicket.pageStore.DefaultPageStore in project wicket by apache.
the class PersistentPageManagerTest method newPersistentPageManager.
private PageStoreManager newPersistentPageManager(String appName) {
IDataStore dataStore = new InMemoryPageStore();
IPageStore pageStore = new DefaultPageStore(new JavaSerializer(appName), dataStore, 4);
IPageManagerContext pageManagerContext = new DummyPageManagerContext();
return new PageStoreManager(appName, pageStore, pageManagerContext);
}
use of org.apache.wicket.pageStore.DefaultPageStore in project wicket by apache.
the class PageVersioningTest method setup.
/**
* setup()
*/
@Before
public void setup() {
final PageVersioningApplication application = new PageVersioningApplication();
wicketTester = new WicketTester(application) {
/**
* @see org.apache.wicket.util.tester.BaseWicketTester#newTestPageManagerProvider()
*/
@Override
protected IPageManagerProvider newTestPageManagerProvider() {
return new IPageManagerProvider() {
@Override
public IPageManager apply(IPageManagerContext pageManagerContext) {
final IDataStore dataStore = new InMemoryPageStore();
final AsynchronousDataStore asyncDS = new AsynchronousDataStore(dataStore, 100);
final DefaultPageStore pageStore = new DefaultPageStore(new JavaSerializer(application.getApplicationKey()), asyncDS, 40);
return new PageStoreManager(application.getName(), pageStore, pageManagerContext);
}
};
}
};
}
use of org.apache.wicket.pageStore.DefaultPageStore in project wicket by apache.
the class TestApp2 method init.
@Override
protected void init() {
getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel"));
setPageManagerProvider(new DefaultPageManagerProvider(this) {
@Override
public IPageManager get(IPageManagerContext pageManagerContext) {
IDataStore dataStore = new HttpSessionDataStore(pageManagerContext, new PageNumberEvictionStrategy(100));
IPageStore pageStore = new DefaultPageStore(new JavaSerializer(getApplicationKey()), dataStore, getStoreSettings().getInmemoryCacheSize());
return new PageStoreManager(getName(), pageStore, pageManagerContext);
}
});
}
Aggregations