Examples of LoadBalancerStrategy


Examples of com.linkedin.d2.balancer.strategies.LoadBalancerStrategy

    partitionDescriptions.put(server3, server3Data);


    //setup strategy which involves tweaking the hash ring to get partitionId -> URI host
    List<LoadBalancerState.SchemeStrategyPair> orderedStrategies = new ArrayList<LoadBalancerState.SchemeStrategyPair>();
    LoadBalancerStrategy strategy = new TestLoadBalancerStrategy(partitionDescriptions);

    orderedStrategies.add(new LoadBalancerState.SchemeStrategyPair("http", strategy));

    //setup the partition accessor which is used to get partitionId -> keys
    PartitionAccessor accessor = new TestPartitionAccessor();
View Full Code Here

Examples of com.linkedin.d2.balancer.strategies.LoadBalancerStrategy

  @Override
  public LoadBalancerStrategy getStrategy(String serviceName, String scheme)
  {
    Map<String, LoadBalancerStrategy> strategies = _serviceStrategies.get(serviceName);
    LoadBalancerStrategy strategy = null;

    if (strategies != null)
    {
      strategy = strategies.get(scheme);
    }
View Full Code Here

Examples of com.linkedin.d2.balancer.strategies.LoadBalancerStrategy

      List<SchemeStrategyPair> orderedStrategies = new ArrayList<SchemeStrategyPair>(prioritizedSchemes.size());
      for (String scheme : prioritizedSchemes)
      {
        // get the strategy for this service and scheme
        LoadBalancerStrategy strategy = getStrategy(serviceName, scheme);

        if (strategy != null)
        {
          orderedStrategies.add(new SchemeStrategyPair(scheme, strategy));
        }
View Full Code Here

Examples of com.linkedin.d2.balancer.strategies.LoadBalancerStrategy

      for (String scheme : schemes)
      {
        Map<String, Object> loadBalancerStrategyProperties =
            new HashMap<String, Object>(serviceProperties.getLoadBalancerStrategyProperties());

        LoadBalancerStrategy strategy = factory.newLoadBalancer(
            serviceProperties.getServiceName(),
            loadBalancerStrategyProperties,
            serviceProperties.getDegraderProperties());

        strategyMap.put(scheme, strategy);
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.