use of lucee.runtime.PageSourceImpl in project Lucee by lucee.
the class ComponentUtil method getPage.
public static Page getPage(PageContext pc, PageSource ps) throws PageException {
PageSourceImpl psi = (PageSourceImpl) ps;
Page p = psi.getPage();
if (p != null) {
// print.o("getPage(existing):"+ps.getDisplayPath()+":"+psi.hashCode()+":"+p.hashCode());
return p;
}
pc = ThreadLocalPageContext.get(pc);
return psi.loadPage(pc, false);
}
use of lucee.runtime.PageSourceImpl in project Lucee by lucee.
the class PagePoolList method toArray.
private static Array toArray(Array arr, PageSourcePool psp) throws PageException {
String[] keys = psp.keys();
PageSourceImpl ps;
for (int y = 0; y < keys.length; y++) {
ps = (PageSourceImpl) psp.getPageSource(keys[y], false);
if (ps.isLoad())
arr.append(ps.getDisplayPath());
}
return arr;
}
use of lucee.runtime.PageSourceImpl in project Lucee by lucee.
the class GetUsageData method templateCacheElements.
private static long[] templateCacheElements(Mapping[] mappings) {
long elements = 0, size = 0;
PageSourcePool psp;
String[] 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.getClassName().replace('.', '/') + ".class");
size += res.length();
}
}
}
return new long[] { elements, size };
}
Aggregations