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 Type
    Method
    Description
    getInstance(InstanceProvider<T> instanceProvider)
    Given a source of instances, return one of them for a single use.
  • Method Details

    • getInstance

      ServiceInstance<T> getInstance(InstanceProvider<T> instanceProvider) throws 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:
      Exception - any errors