Package railo.runtime.type

Examples of railo.runtime.type.DoubleStruct


  public static Struct getInfo(ConfigImpl config) throws PageException {
   
    Struct sct=new StructImpl();
   
    // memory
    DoubleStruct mem=new DoubleStruct();
    sct.set(KeyConstants._memory, mem);
    getInfoMemory(mem, config);
   
    // count
    //ScopeContext sc = ((CFMLFactoryImpl)config.getFactory()).getScopeContext();
View Full Code Here


    return sct;
  }

 
  private static void getInfoMemory(Struct parent, ConfigImpl config) throws PageException {
    DoubleStruct server = new DoubleStruct();
    DoubleStruct web = new DoubleStruct();
    parent.set(KeyConstants._server, server);
    parent.set(KeyConstants._web, web);
   
    boolean isConfigWeb=config instanceof ConfigWeb;
   
View Full Code Here

      }
    }
  }

  private static void _getInfoMemory(Struct web, Struct server, ConfigImpl config) throws PageException {
    DoubleStruct sct = new DoubleStruct();
    infoMapping(sct,config);
    //infoResources(sct,config);
   
    infoScopes(sct,server,config);
    infoPageContextStack(sct,config.getFactory());
View Full Code Here

 



  private static void infoMapping(Struct parent,Config config) throws PageException {
    DoubleStruct map=new DoubleStruct();
    infoMapping(map,config.getMappings(),false);
      infoMapping(map,config.getCustomTagMappings(),true);
      parent.set(KeyConstants._mappings, map);
  }
View Full Code Here

  }

  private static void infoMapping(Struct map, Mapping[] mappings, boolean isCustomTagMapping) throws PageException {
    if(mappings==null) return;
   
    DoubleStruct sct=new DoubleStruct();
     
    long size;
    MappingImpl mapping;
    for(int i=0;i<mappings.length;i++)  {
      mapping=(MappingImpl) mappings[i];
     
      // archive classloader
      size=SizeOf.size(mapping.getClassLoaderForArchive());
      sct.set("archiveClassLoader", Caster.toDouble(size));
     
      // physical classloader
      size=0;
      try {
        size=SizeOf.size(mapping.touchPCLCollection());
      } catch (Exception e) {}
      sct.set("physicalClassLoader", Caster.toDouble(size));
     
      // pagepool
      size=SizeOf.size(mapping.getPageSourcePool());
      sct.set(PAGE_POOL, Caster.toDouble(size));
     
      map.set(!isCustomTagMapping?
          mapping.getVirtual():mapping.getStrPhysical(),
          sct);
    }
View Full Code Here

    }
  }

  private static void infoScopes(Struct web,Struct server,ConfigImpl config) throws PageException {
    ScopeContext sc = ((CFMLFactoryImpl)config.getFactory()).getScopeContext();
    DoubleStruct webScopes=new DoubleStruct();
    DoubleStruct srvScopes=new DoubleStruct();
   
    long s;
    s=sc.getScopesSize(Scope.SCOPE_SESSION);
    webScopes.set("session", Caster.toDouble(s));
   
    s=sc.getScopesSize(Scope.SCOPE_APPLICATION);
    webScopes.set("application", Caster.toDouble(s));
   
    s=sc.getScopesSize(Scope.SCOPE_CLUSTER);
    srvScopes.set("cluster", Caster.toDouble(s));

    s=sc.getScopesSize(Scope.SCOPE_SERVER);
    srvScopes.set("server", Caster.toDouble(s));

    s=sc.getScopesSize(Scope.SCOPE_CLIENT);
    webScopes.set("client", Caster.toDouble(s));
   
    web.set(KeyConstants._scopes, webScopes);
View Full Code Here

TOP

Related Classes of railo.runtime.type.DoubleStruct

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.