Class RoundRobinStrategy<T>
- java.lang.Object
-
- org.apache.curator.x.discovery.strategies.RoundRobinStrategy<T>
-
- All Implemented Interfaces:
ProviderStrategy<T>
public class RoundRobinStrategy<T> extends java.lang.Object implements ProviderStrategy<T>
This strategy rotates sequentially through the list of instances
-
-
Constructor Summary
Constructors Constructor Description RoundRobinStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceInstance<T>
getInstance(InstanceProvider<T> instanceProvider)
Given a source of instances, return one of them for a single use.
-
-
-
Method Detail
-
getInstance
public ServiceInstance<T> getInstance(InstanceProvider<T> instanceProvider) throws java.lang.Exception
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:
java.lang.Exception
- any errors
-
-