Package railo.runtime

Examples of railo.runtime.PageSourcePool


  }
 
  private static long[] templateCacheElements(Mapping[] mappings) {
    long elements=0,size=0;
   
    PageSourcePool psp;
    Object[] keys;
    PageSourceImpl ps;
    Resource res;
    MappingImpl mapping;
    for(int i=0;i<mappings.length;i++){
      mapping=(MappingImpl)mappings[i];
      psp = mapping.getPageSourcePool();
      keys = psp.keys();
      for(int y=0;y<keys.length;y++)  {
        ps = (PageSourceImpl) psp.getPageSource(keys[y], false);
        if(ps.isLoad()) {
          elements++;
          res=mapping.getClassRootDirectory().getRealResource(ps.getJavaName()+".class");
          size+=res.length();
        }
View Full Code Here


        int size=0;
        for(int i=0;i<pools.length;i++)size+=pools[i].size();
        return size;
    }
    private void removeOldest(PageSourcePool[] pools) {
        PageSourcePool pool=null;
        Object key=null;
        PageSource ps=null;
       
        long date=-1;
        for(int i=0;i<pools.length;i++) {
          try {
              Object[] keys=pools[i].keys();
              for(int y=0;y<keys.length;y++) {
                  ps = pools[i].getPageSource(keys[y],false);
                  if(date==-1 || date>ps.getLastAccessTime()) {
                      pool=pools[i];
                      key=keys[y];
                      date=ps.getLastAccessTime();
                  }
              }
          }
          catch(Throwable t) {
            pools[i].clear();
          }
         
        }
        if(pool!=null)pool.remove(key);
    }
View Full Code Here

TOP

Related Classes of railo.runtime.PageSourcePool

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.