Examples of LoadBalance


Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

   
    public Result invoke(final Invocation invocation) throws RpcException {

        checkWheatherDestoried();

        LoadBalance loadbalance;
       
        List<Invoker<T>> invokers = list(invocation);
        if (invokers != null && invokers.size() > 0) {
            loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(invokers.get(0).getUrl()
                    .getMethodParameter(invocation.getMethodName(),Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE));
View Full Code Here

Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

            throw new RpcException("Rpc invoker for " + getInterface() + " on consumer " + NetUtils.getLocalHost()
                    + " use dubbo version " + Version.getVersion()
                    + " is not destroyed! Can not invoke any more.");
        }
       
        LoadBalance loadbalance;
       
        List<Invoker<T>> invokers = directory.list(invocation);
        if (invokers != null && invokers.size() > 0) {
            loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(invokers.get(0).getUrl()
                    .getMethodParameter(invocation.getMethodName(),Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE));
View Full Code Here

Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

            throw new RpcException("Rpc invoker for " + getInterface() + " on consumer " + NetUtils.getLocalHost()
                    + " use dubbo version " + Version.getVersion()
                    + " is not destroyed! Can not invoke any more.");
        }
       
        LoadBalance loadbalance;
       
        List<Invoker<T>> invokers = directory.list(invocation);
        if (invokers != null && invokers.size() > 0) {
            loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(invokers.get(0).getUrl()
                    .getMethodParameter(invocation.getMethodName(),Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE));
View Full Code Here

Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

        if (method == null || method.length() == 0) {
            name = url.getParameter(Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE);
        } else {
            name = url.getMethodParameter(method, Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE);
        }
        LoadBalance loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(name);
        return loadbalance.select(invokers, invocation);
    }
View Full Code Here

Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

        if (method == null || method.length() == 0) {
            name = url.getParameter(Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE);
        } else {
            name = url.getMethodParameter(method, Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE);
        }
        LoadBalance loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(name);
        return loadbalance.select(invokers, invocation);
    }
View Full Code Here

Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

   
    public Result invoke(final Invocation invocation) throws RpcException {

        checkWheatherDestoried();

        LoadBalance loadbalance;
       
        List<Invoker<T>> invokers = directory.list(invocation);
        if (invokers != null && invokers.size() > 0) {
            loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(invokers.get(0).getUrl()
                    .getMethodParameter(invocation.getMethodName(),Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE));
View Full Code Here

Examples of com.alibaba.dubbo.rpc.cluster.LoadBalance

   
    public Result invoke(final Invocation invocation) throws RpcException {

        checkWheatherDestoried();

        LoadBalance loadbalance;
       
        List<Invoker<T>> invokers = directory.list(invocation);
        if (invokers != null && invokers.size() > 0) {
            loadbalance = ExtensionLoader.getExtensionLoader(LoadBalance.class).getExtension(invokers.get(0).getUrl()
                    .getMethodParameter(invocation.getMethodName(),Constants.LOADBALANCE_KEY, Constants.DEFAULT_LOADBALANCE));
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.LoadBalance

    } else if (this instanceof Unmarshal) {
      return "unmarshal";
    } else if (this instanceof Try) {
      return "try";
    } else if (this instanceof LoadBalance) {
      LoadBalance load = (LoadBalance) this;
      if (load.getRef() != null) {
        return "custom " + Strings.getOrElse(load.getRef());
      } else if (load.getLoadBalancerType() != null) {
        if (load.getLoadBalancerType().getClass().isAssignableFrom(CustomLoadBalancerDefinition.class)) {
          CustomLoadBalancerDefinition custom = (CustomLoadBalancerDefinition) load.getLoadBalancerType();
          return "custom " + Strings.getOrElse(custom.getRef());
        } else if (load.getLoadBalancerType().getClass().isAssignableFrom(FailoverLoadBalancerDefinition.class)) {
          return "failover";
        } else if (load.getLoadBalancerType().getClass().isAssignableFrom(RandomLoadBalancerDefinition.class)) {
          return "random";
        } else if (load.getLoadBalancerType().getClass().isAssignableFrom(RoundRobinLoadBalancerDefinition.class)) {
          return "round robin";
        } else if (load.getLoadBalancerType().getClass().isAssignableFrom(StickyLoadBalancerDefinition.class)) {
          return "sticky";
        } else if (load.getLoadBalancerType().getClass().isAssignableFrom(TopicLoadBalancerDefinition.class)) {
          return "topic";
        } else if (load.getLoadBalancerType().getClass().isAssignableFrom(WeightedLoadBalancerDefinition.class)) {
          return "weighted";
        }
      } else {
        return "load balance";
      }
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.LoadBalance

        imageProvider.addIconsForClass(new InOnly());
        imageProvider.addIconsForClass(new InOut());
        imageProvider.addIconsForClass(new Intercept());
        imageProvider.addIconsForClass(new InterceptFrom());
        imageProvider.addIconsForClass(new InterceptSendToEndpoint());
        imageProvider.addIconsForClass(new LoadBalance());
        imageProvider.addIconsForClass(new Log());
        imageProvider.addIconsForClass(new Loop());
        imageProvider.addIconsForClass(new Marshal());
        imageProvider.addIconsForClass(new Multicast());
        imageProvider.addIconsForClass(new OnCompletion());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.