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
Modifier and TypeMethodDescriptiongetInstance
(InstanceProvider<T> instanceProvider) Given a source of instances, return one of them for a single use.
-
Method Details
-
getInstance
Given a source of instances, return one of them for a single use.- Parameters:
instanceProvider
- the instance provider- Returns:
- the instance to use
- Throws:
Exception
- any errors
-