Package org.ldaptive
Class ActivePassiveConnectionStrategy
- java.lang.Object
-
- org.ldaptive.AbstractConnectionStrategy
-
- org.ldaptive.ActivePassiveConnectionStrategy
-
- All Implemented Interfaces:
Iterable<LdapURL>
,ConnectionStrategy
public class ActivePassiveConnectionStrategy extends AbstractConnectionStrategy
Connection strategy that attempts hosts ordered exactly the way they are configured. This means that the first host will always be attempted first, followed by each host in the list.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldaptive.AbstractConnectionStrategy
AbstractConnectionStrategy.DefaultLdapURLIterator
-
-
Field Summary
Fields Modifier and Type Field Description private Function<List<LdapURL>,Iterator<LdapURL>>
iterFunction
Custom iterator function.-
Fields inherited from class org.ldaptive.AbstractConnectionStrategy
ldapURLSet, logger
-
-
Constructor Summary
Constructors Constructor Description ActivePassiveConnectionStrategy()
Default constructor.ActivePassiveConnectionStrategy(Function<List<LdapURL>,Iterator<LdapURL>> function)
Creates a new active passive connection strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<LdapURL>
iterator()
ActivePassiveConnectionStrategy
newInstance()
Create a deep copy of this strategy.-
Methods inherited from class org.ldaptive.AbstractConnectionStrategy
failure, getActivateCondition, getRetryCondition, initialize, isInitialized, populate, setRetryCondition, success, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
newInstance
public ActivePassiveConnectionStrategy newInstance()
Description copied from interface:ConnectionStrategy
Create a deep copy of this strategy.- Returns:
- new instance of this connection strategy
-
-