Package org.ldaptive
Class RandomConnectionStrategy
- java.lang.Object
-
- org.ldaptive.AbstractConnectionStrategy
-
- org.ldaptive.RandomConnectionStrategy
-
- All Implemented Interfaces:
java.lang.Iterable<LdapURL>
,ConnectionStrategy
public class RandomConnectionStrategy extends AbstractConnectionStrategy
Connection strategy that randomizes the list of configured URLs. A random URL ordering will be created for each connection attempt.- 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 RandomConnectionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<LdapURL>
iterator()
RandomConnectionStrategy
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 RandomConnectionStrategy newInstance()
Description copied from interface:ConnectionStrategy
Create a deep copy of this strategy.- Returns:
- new instance of this connection strategy
-
-