Class RoundRobinStrategy<T>
java.lang.Object
org.apache.curator.x.discovery.strategies.RoundRobinStrategy<T>
- All Implemented Interfaces:
ProviderStrategy<T>
This strategy rotates sequentially through the list of instances
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetInstance
(InstanceProvider<T> instanceProvider) Given a source of instances, return one of them for a single use.
-
Constructor Details
-
RoundRobinStrategy
public RoundRobinStrategy()
-
-
Method Details
-
getInstance
Description copied from interface:ProviderStrategy
Given a source of instances, return one of them for a single use.- Specified by:
getInstance
in interfaceProviderStrategy<T>
- Parameters:
instanceProvider
- the instance provider- Returns:
- the instance to use
- Throws:
Exception
- any errors
-