Package org.ldaptive
Class RoundRobinConnectionStrategy
- java.lang.Object
-
- org.ldaptive.AbstractConnectionStrategy
-
- org.ldaptive.RoundRobinConnectionStrategy
-
- All Implemented Interfaces:
java.lang.Iterable<LdapURL>
,ConnectionStrategy
public class RoundRobinConnectionStrategy extends AbstractConnectionStrategy
Connection strategy that reorders its URLs based on the number of times it's been invoked.- Author:
- Middleware Services
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ldaptive.AbstractConnectionStrategy
AbstractConnectionStrategy.DefaultLdapURLIterator
-
-
Field Summary
-
Fields inherited from class org.ldaptive.AbstractConnectionStrategy
ldapURLSet, logger
-
-
Constructor Summary
Constructors Constructor Description RoundRobinConnectionStrategy()
Default constructor.RoundRobinConnectionStrategy(java.util.function.Function<java.util.List<LdapURL>,java.util.Iterator<LdapURL>> function)
Creates a new round robin connection strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<LdapURL>
iterator()
RoundRobinConnectionStrategy
newInstance()
Create a deep copy of this strategy.-
Methods inherited from class org.ldaptive.AbstractConnectionStrategy
failure, getActivateCondition, getRetryCondition, initialize, isInitialized, populate, setRetryCondition, success, toString
-
-
-
-
Method Detail
-
iterator
public java.util.Iterator<LdapURL> iterator()
-
newInstance
public RoundRobinConnectionStrategy newInstance()
Description copied from interface:ConnectionStrategy
Create a deep copy of this strategy.- Returns:
- new instance of this connection strategy
-
-