Пример #1
0
 /**
  * Configure and reload the load balancer
  *
  * @throws LoadBalancerExtensionException if the configuration or reload process fails
  */
 private void configureAndReload() throws LoadBalancerExtensionException {
   // Configure load balancer
   if (loadBalancer.configure(topologyProvider.getTopology())) {
     // Reload the load balancer
     loadBalancer.reload();
   }
 }
Пример #2
0
  /**
   * Configure and start the load balancer
   *
   * @throws LoadBalancerExtensionException if configuration or start process fails
   */
  private void configureAndStart() throws LoadBalancerExtensionException {
    // Initialize topology
    if (!topologyEventReceiver.isInitialized()) {
      topologyEventReceiver.initializeTopology();
    }

    // Configure load balancer
    Topology topology = topologyProvider.getTopology();
    if (topologyPopulated(topology) && loadBalancer.configure(topology)) {
      // Start load balancer
      loadBalancer.start();
      loadBalancerStarted = true;
    }
  }