mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
22.37.2009 9d6f5c9a5b7771e595892e6935cf1cc42012c4c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.opends.sdk;
 
/**
 * Created by IntelliJ IDEA. User: digitalperk Date: Dec 15, 2009 Time: 5:42:01
 * PM To change this template use File | Settings | File Templates.
 */
public class FailoverLoadBalancingAlgorithm
    extends AbstractLoadBalancingAlgorithm
{
  public FailoverLoadBalancingAlgorithm(ConnectionFactory<?>... factories)
  {
    super(factories);
  }
 
  public ConnectionFactory<?> getNextConnectionFactory()
  {
    for(MonitoredConnectionFactory f : factoryList)
    {
      if(f.isOperational())
      {
        return f;
      }
    }
    return null;
  }
}