Package org.apache.wicket.session.pagemap

Examples of org.apache.wicket.session.pagemap.IPageMapEntry


    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(data);
      if (entry != null)
      {
        page = entry.getPage();
        if (versionNumber != -1)
        {
          page = page.getVersion(versionNumber);
        }
      }
View Full Code Here


  {
    long size = Objects.sizeof(this);
    Iterator it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = (IPageMapEntry)it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(data);
      if (entry != null)
      {
        page = entry.getPage();
        if (versionNumber != -1)
        {
          page = page.getVersion(versionNumber);
        }
      }
View Full Code Here

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(bytes);
      if (entry != null)
      {
        page = entry.getPage();
        page = page.getVersion(versionNumber);
      }
    }
    finally
    {
View Full Code Here

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(data);
      if (entry != null)
      {
        page = entry.getPage();
        if (versionNumber != -1)
        {
          page = page.getVersion(versionNumber);
        }
      }
View Full Code Here

   *            The version to get
   * @return Any page having the given id
   */
  public final Page get(final int id, int versionNumber)
  {
    final IPageMapEntry entry = (IPageMapEntry)getSession().getAttribute(attributeForId(id));
    if (entry != null)
    {
      // Get page as dirty
      Page page = entry.getPage();

      // TODO Performance: Is this really the case is a page always dirty
      // even if we just render it again? POSSIBLE ANSWER: The page could
      // mark itself as clean to prevent replication, but the reverse is
      // probably not desirable (pages marking themselves dirty manually)
View Full Code Here

    // Page only goes into session if it is stateless
    if (!page.isPageStateless())
    {
      Session session = getSession();
      // Get page map entry from page
      final IPageMapEntry entry = page.getPageMapEntry();

      // Entry has been accessed
      pushAccess(entry);

      // Store entry in session
      final String attribute = attributeForId(entry.getNumericId());

      if (session.getAttribute(attribute) == null)
      {
        // Set attribute if it is a new page, so that it will exists
        // already for other threads that can come on the same time.
View Full Code Here

        {
          // Pop unreachable access off top of stack
          final Access topAccess = popAccess();

          // Get entry for access
          final IPageMapEntry top = getEntry(topAccess.getId());

          // If it's a page we can remove version info
          if (top instanceof Page)
          {
            // If there's more than one version
View Full Code Here

  {
    long size = Objects.sizeof(this);
    Iterator it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = (IPageMapEntry)it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here

  {
    long size = Objects.sizeof(this);
    Iterator<IPageMapEntry> it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here

TOP

Related Classes of org.apache.wicket.session.pagemap.IPageMapEntry

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.