Package railo.commons.collection

Examples of railo.commons.collection.LongKeyList


  public void clearUnused(ConfigImpl config) {
   
    SystemOut.printDate(config.getOutWriter(),"PagePool: "+size()+">("+maxSize+")");
    if(size()>maxSize) {
      Object[] keys=keys();
      LongKeyList list=new LongKeyList();
      for(int i=0;i<keys.length;i++) {
          PageSource ps= getPageSource(keys[i],false);
        long updateTime=ps.getLastAccessTime();
        if(updateTime+timeout<System.currentTimeMillis()) {
          long add=((ps.getAccessCount()-1)*10000);
          if(add>timeout)add=timeout;
          list.add(updateTime+add,keys[i]);
        }
      }
      while(size()>maxSize) {
        Object key = list.shift();
        if(key==null)break;
        remove(key);
      }
    }
  }
View Full Code Here

TOP

Related Classes of railo.commons.collection.LongKeyList

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.