use of lucee.runtime.type.scope.ClusterWrap in project Lucee by lucee.
the class ConfigServerImpl method createClusterScope.
/*private static long _countx(ConfigWebImpl config) {
long count=0;
count+=_count(config.getMappings());
count+=_count(config.getCustomTagMappings());
count+=_count(config.getComponentMappings());
count+=_count(config.getFunctionMapping());
count+=_count(config.getServerFunctionMapping());
count+=_count(config.getTagMapping());
count+=_count(config.getServerTagMapping());
//count+=_count(((ConfigWebImpl)config).getServerTagMapping());
return count;
}*/
/*private static long _count(Mapping[] mappings) {
long count=0;
for(int i=0;i<mappings.length;i++){
count+=_count(mappings[i]);
}
return count;
}*/
/*private static long _countx(Mapping mapping) {
PCLCollection pcl = ((MappingImpl)mapping).getPCLCollection();
return pcl==null?0:pcl.count();
}*/
@Override
public Cluster createClusterScope() throws PageException {
Cluster cluster = null;
try {
if (Reflector.isInstaneOf(getClusterClass(), Cluster.class)) {
cluster = (Cluster) ClassUtil.loadInstance(getClusterClass(), ArrayUtil.OBJECT_EMPTY);
cluster.init(this);
} else if (Reflector.isInstaneOf(getClusterClass(), ClusterRemote.class)) {
ClusterRemote cb = (ClusterRemote) ClassUtil.loadInstance(getClusterClass(), ArrayUtil.OBJECT_EMPTY);
cluster = new ClusterWrap(this, cb);
// cluster.init(cs);
}
} catch (Exception e) {
throw Caster.toPageException(e);
}
return cluster;
}
Aggregations