Package org.apache.wicket.settings

Examples of org.apache.wicket.settings.StoreSettings


  @Override
  public IPageManager get(IPageManagerContext pageManagerContext)
  {
    IDataStore dataStore = newDataStore();

    StoreSettings storeSettings = getStoreSettings();

    if (dataStore.canBeAsynchronous())
    {
      int capacity = storeSettings.getAsynchronousQueueCapacity();
      dataStore = new AsynchronousDataStore(dataStore, capacity);
    }

    IPageStore pageStore = newPageStore(dataStore);
    return new PageStoreManager(application.getName(), pageStore, pageManagerContext);
View Full Code Here


//    return new PerSessionPageStore(pageSerializer, dataStore, inmemoryCacheSize);
  }

  protected IDataStore newDataStore()
  {
    StoreSettings storeSettings = getStoreSettings();
    Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
    File fileStoreFolder = storeSettings.getFileStoreFolder();

    return new DiskDataStore(application.getName(), fileStoreFolder, maxSizePerSession);
  }
View Full Code Here

  public final StoreSettings getStoreSettings()
  {
    checkSettingsAvailable();
    if (storeSettings == null)
    {
      storeSettings = new StoreSettings(this);
    }
    return storeSettings;
  }
View Full Code Here

  @Test
  public void store()
  {
    generateFiles();

    StoreSettings storeSettings = new StoreSettings(null);
    java.io.File fileStoreFolder = storeSettings.getFileStoreFolder();

    dataStore = new DiskDataStore("app1", fileStoreFolder, MAX_SIZE_PER_SESSION);
    int asynchronousQueueCapacity = storeSettings.getAsynchronousQueueCapacity();
    dataStore = new AsynchronousDataStore(dataStore, asynchronousQueueCapacity);

    doTestDataStore();

    dataStore.destroy();
View Full Code Here

   * it is put in folders which names are automatically calculated on the fly.
   */
  @Test
  public void sessionFolderName()
  {
    StoreSettings storeSettings = new StoreSettings(null);
    java.io.File fileStoreFolder = storeSettings.getFileStoreFolder();
    DiskDataStore store = new DiskDataStore("sessionFolderName", fileStoreFolder, MAX_SIZE_PER_SESSION);

    String sessionId = "abcdefg";
    java.io.File sessionFolder = store.getSessionFolder(sessionId, true);
    String absolutePath = sessionFolder.getAbsolutePath();
View Full Code Here

  }

  @Override
  protected IDataStore newDataStore()
  {
    StoreSettings storeSettings = application.getStoreSettings();
    File fileStoreFolder = storeSettings.getFileStoreFolder();
    Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
    dataStore = new DebugDiskDataStore(application.getName(), fileStoreFolder,
      maxSizePerSession);
    return dataStore;
  }
View Full Code Here

  public final StoreSettings getStoreSettings()
  {
    checkSettingsAvailable();
    if (storeSettings == null)
    {
      storeSettings = new StoreSettings(this);
    }
    return storeSettings;
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.settings.StoreSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.