Package org.apache.wicket.util.concurrent

Examples of org.apache.wicket.util.concurrent.ConcurrentHashMap


  {
    IClassCache classesToGetAndSetters = getClassesToGetAndSetters();
    Map getAndSetters = (Map)classesToGetAndSetters.get(clz);
    if (getAndSetters == null)
    {
      getAndSetters = new ConcurrentHashMap(8);
      classesToGetAndSetters.put(clz, getAndSetters);
    }

    IGetAndSet getAndSetter = (IGetAndSet)getAndSetters.get(exp);
    if (getAndSetter == null)
View Full Code Here


      try
      {
        InputStream stream = new FileInputStream(index);
        ObjectInputStream ois = new ObjectInputStream(stream);
        Map map = (Map)ois.readObject();
        sessionIdToEntryMap = new ConcurrentHashMap(map);
        for (Iterator entries = sessionIdToEntryMap.entrySet().iterator(); entries.hasNext();)
        {
          // initialize the diskPageStore reference
          Entry entry = (Entry)entries.next();
          SessionEntry sessionEntry = (SessionEntry)entry.getValue();
View Full Code Here

        {
          removeLast();
        }
      }
    });
    liveSessions = new ConcurrentHashMap();
  }
View Full Code Here

   *
   * @return cache
   */
  protected Map newCache()
  {
    return new ConcurrentHashMap();
  }
View Full Code Here

  public FilePageStore(File dir)
  {
    defaultWorkDir = new File(dir, "sessions/");
    defaultWorkDir.mkdirs();

    pagesToBeSerialized = new ConcurrentHashMap();
    pagesToBeSaved = new ConcurrentHashMap();
    appName = Application.get().getApplicationKey();

    saveThread = new PageSavingThread();
    Thread t = new Thread(saveThread, "FilePageSavingThread-" + appName);
    t.setDaemon(true);
View Full Code Here

    {
      return null;
    }
    else if (pageMapToList == null && createIfDoesNotExist == true)
    {
      pageMapToList = new ConcurrentHashMap();
      pageVersionMap.put(sessionId, pageMapToList);
    }

    List versions = (List)pageMapToList.get(pageMapName);
    if (versions == null && createIfDoesNotExist)
View Full Code Here

        {
          removeLast();
        }
      }
    });
    liveSessions = new ConcurrentHashMap();
  }
View Full Code Here

  {
    Map classesToGetAndSetters = getClassesToGetAndSetters();
    Map getAndSetters = (Map)classesToGetAndSetters.get(clz);
    if (getAndSetters == null)
    {
      getAndSetters = new ConcurrentHashMap(8);
      classesToGetAndSetters.put(clz, getAndSetters);
    }

    IGetAndSet getAndSetter = (IGetAndSet)getAndSetters.get(exp);
    if (getAndSetter == null)
View Full Code Here

    if (result == null)
    {
      // Don't synchronize this - Doesn't matter if we create two of them,
      // as it's only a cache and the first will go out of scope and get
      // GC'ed.
      applicationToClassesToGetAndSetters.put(app, result = new ConcurrentHashMap(64));
    }
    return result;
  }
View Full Code Here

  {
    Map classesToGetAndSetters = getClassesToGetAndSetters();
    Map getAndSetters = (Map)classesToGetAndSetters.get(clz);
    if (getAndSetters == null)
    {
      getAndSetters = new ConcurrentHashMap(8);
      classesToGetAndSetters.put(clz, getAndSetters);
    }

    IGetAndSet getAndSetter = (IGetAndSet)getAndSetters.get(exp);
    if (getAndSetter == null)
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.concurrent.ConcurrentHashMap

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.