Package org.apache.wicket.protocol.http.pagestore.PageWindowManager

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


    {
      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

      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

    {
      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

      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

    {
      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

      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

    {
      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

      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

    {
      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

TOP

Related Classes of org.apache.wicket.protocol.http.pagestore.PageWindowManager.PageWindow

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.