Search in sources :

Example 1 with ClusterWrap

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;
}
Also used : ClusterWrap(lucee.runtime.type.scope.ClusterWrap) Cluster(lucee.runtime.type.scope.Cluster) FunctionLibException(lucee.transformer.library.function.FunctionLibException) PageException(lucee.runtime.exp.PageException) TagLibException(lucee.transformer.library.tag.TagLibException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) MalformedURLException(java.net.MalformedURLException) IOException(java.io.IOException) ExpressionException(lucee.runtime.exp.ExpressionException) ApplicationException(lucee.runtime.exp.ApplicationException) ClusterRemote(lucee.runtime.type.scope.ClusterRemote)

Aggregations

IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 ApplicationException (lucee.runtime.exp.ApplicationException)1 ExpressionException (lucee.runtime.exp.ExpressionException)1 PageException (lucee.runtime.exp.PageException)1 Cluster (lucee.runtime.type.scope.Cluster)1 ClusterRemote (lucee.runtime.type.scope.ClusterRemote)1 ClusterWrap (lucee.runtime.type.scope.ClusterWrap)1 FunctionLibException (lucee.transformer.library.function.FunctionLibException)1 TagLibException (lucee.transformer.library.tag.TagLibException)1