Examples of PageWindow


Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

    {
      byte[] result = null;
      PageMapEntry entry = getPageMapEntry(pageMapName, false);
      if (entry != null)
      {
        PageWindow window = entry.manager.getPageWindow(id, versionNumber,
          ajaxVersionNumber);
        if (window != null)
        {
          result = loadPage(window, entry.fileName);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

      if (page.getData() != null)
      {
        PageMapEntry entry = getPageMapEntry(page.getPageMapName(), true);

        // allocate window for page
        PageWindow window = entry.manager.createPageWindow(page.getPageId(), page
            .getVersionNumber(), page.getAjaxVersionNumber(), page.getData().length);

        // remove the entry and add it to the end of entry list (to mark
        // it as last accessed(
        pageMapEntryList.remove(entry);
        pageMapEntryList.add(entry);

        // if we exceeded maximum session size, try to remove as many
        // pagemap as necessary and possible
        while (getTotalSize() > getMaxSizePerSession() && pageMapEntryList.size() > 1)
        {
          removePageMapEntry((PageMapEntry)pageMapEntryList.get(0));
        }

        // take the filechannel from the pool
        FileChannel channel = fileChannelPool.getFileChannel(entry.fileName, true);
        try
        {
          // write the content
          channel.write(ByteBuffer.wrap(page.getData()), window.getFilePartOffset());
        }
        catch (IOException e)
        {
          log.error("Error writing to a channel " + channel, e);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

    {
      byte[] result = null;
      PageMapEntry entry = getPageMapEntry(pageMapName, false);
      if (entry != null)
      {
        PageWindow window = entry.manager.getPageWindow(id, versionNumber,
            ajaxVersionNumber);
        if (window != null)
        {
          result = loadPage(window, entry.fileName);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

      if (page.getData() != null)
      {
        PageMapEntry entry = getPageMapEntry(page.getPageMapName(), true);

        // allocate window for page
        PageWindow window = entry.manager.createPageWindow(page.getPageId(),
          page.getVersionNumber(), page.getAjaxVersionNumber(), page.getData().length);

        // remove the entry and add it to the end of entry list (to mark
        // it as last accessed(
        pageMapEntryList.remove(entry);
        pageMapEntryList.add(entry);

        // if we exceeded maximum session size, try to remove as many
        // pagemap as necessary and possible
        while (getTotalSize() > diskPageStore.getMaxSizePerSession() &&
          pageMapEntryList.size() > 1)
        {
          removePageMapEntry((PageMapEntry)pageMapEntryList.get(0));
        }

        // take the filechannel from the pool
        FileChannel channel = diskPageStore.fileChannelPool.getFileChannel(entry.fileName,
          true);
        try
        {
          // write the content
          channel.write(ByteBuffer.wrap(page.getData()), window.getFilePartOffset());
        }
        catch (IOException e)
        {
          log.error("Error writing to a channel " + channel, e);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

    {
      byte[] result = null;
      PageMapEntry entry = getPageMapEntry(pageMapName, false);
      if (entry != null)
      {
        PageWindow window = entry.manager.getPageWindow(id, versionNumber,
          ajaxVersionNumber);
        if (window != null)
        {
          result = loadPage(window, entry.fileName);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

      if (page.getData() != null)
      {
        PageMapEntry entry = getPageMapEntry(page.getPageMapName(), true);

        // allocate window for page
        PageWindow window = entry.manager.createPageWindow(page.getPageId(),
          page.getVersionNumber(), page.getAjaxVersionNumber(), page.getData().length);

        // remove the entry and add it to the end of entry list (to mark
        // it as last accessed(
        pageMapEntryList.remove(entry);
        pageMapEntryList.add(entry);

        // if we exceeded maximum session size, try to remove as many
        // pagemap as necessary and possible
        while (getTotalSize() > diskPageStore.getMaxSizePerSession() &&
          pageMapEntryList.size() > 1)
        {
          removePageMapEntry(pageMapEntryList.get(0));
        }

        // take the filechannel from the pool
        FileChannel channel = diskPageStore.fileChannelPool.getFileChannel(entry.fileName,
          true);
        try
        {
          // write the content
          channel.write(ByteBuffer.wrap(page.getData()), window.getFilePartOffset());
        }
        catch (IOException e)
        {
          log.error("Error writing to a channel " + channel, e);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

    {
      byte[] result = null;
      PageMapEntry entry = getPageMapEntry(pageMapName, false);
      if (entry != null)
      {
        PageWindow window = entry.manager.getPageWindow(id, versionNumber,
          ajaxVersionNumber);
        if (window != null)
        {
          result = loadPage(window, entry.fileName);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

      if (page.getData() != null)
      {
        PageMapEntry entry = getPageMapEntry(page.getPageMapName(), true);

        // allocate window for page
        PageWindow window = entry.manager.createPageWindow(page.getPageId(),
          page.getVersionNumber(), page.getAjaxVersionNumber(), page.getData().length);

        // remove the entry and add it to the end of entry list (to mark
        // it as last accessed(
        pageMapEntryList.remove(entry);
        pageMapEntryList.add(entry);

        // if we exceeded maximum session size, try to remove as many
        // pagemap as necessary and possible
        while (getTotalSize() > diskPageStore.getMaxSizePerSession() &&
          pageMapEntryList.size() > 1)
        {
          removePageMapEntry(pageMapEntryList.get(0));
        }

        // take the filechannel from the pool
        FileChannel channel = diskPageStore.fileChannelPool.getFileChannel(entry.fileName,
          true);
        try
        {
          // write the content
          channel.write(ByteBuffer.wrap(page.getData()), window.getFilePartOffset());
        }
        catch (IOException e)
        {
          log.error("Error writing to a channel " + channel, e);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

    {
      byte[] result = null;
      PageMapEntry entry = getPageMapEntry(pageMapName, false);
      if (entry != null)
      {
        PageWindow window = entry.manager.getPageWindow(id, versionNumber,
          ajaxVersionNumber);
        if (window != null)
        {
          result = loadPage(window, entry.fileName);
        }
View Full Code Here

Examples of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

   *
   */
  public void testAddRemove()
  {
    PageWindowManager manager = new PageWindowManager(300);
    PageWindow window;

    window = manager.createPageWindow(1, 1, 1, 50);
    assertWindow(window, 1, 1, 1, 0, 50);

    window = manager.createPageWindow(1, 1, 2, 40);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.