Package org.apache.curator.x.discovery
Interface ProviderStrategy<T>
-
- All Known Implementing Classes:
RandomStrategy
,RoundRobinStrategy
,StickyStrategy
public interface ProviderStrategy<T>
A strategy for picking one from a set of instances
-
-
Method Summary
All Methods Instance Methods Abstract 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
ServiceInstance<T> getInstance(InstanceProvider<T> instanceProvider) throws java.lang.Exception
Given a source of instances, return one of them for a single use.- Parameters:
instanceProvider
- the instance provider- Returns:
- the instance to use
- Throws:
java.lang.Exception
- any errors
-
-