Class RoundRobinUnlessLocalStrategy

  • All Implemented Interfaces:
    org.apache.curator.x.discovery.ProviderStrategy<AieServiceInfo>

    public class RoundRobinUnlessLocalStrategy
    extends org.apache.curator.x.discovery.strategies.RoundRobinStrategy<AieServiceInfo>
    A discovery provider strategy that will return the local service instance if available within this process, and uses round-robin if not.
    • Constructor Detail

      • RoundRobinUnlessLocalStrategy

        public RoundRobinUnlessLocalStrategy()
    • Method Detail

      • getInstance

        public org.apache.curator.x.discovery.ServiceInstance<AieServiceInfo> getInstance​(org.apache.curator.x.discovery.details.InstanceProvider<AieServiceInfo> instanceProvider)
                                                                                   throws java.lang.Exception
        Specified by:
        getInstance in interface org.apache.curator.x.discovery.ProviderStrategy<AieServiceInfo>
        Overrides:
        getInstance in class org.apache.curator.x.discovery.strategies.RoundRobinStrategy<AieServiceInfo>
        Throws:
        java.lang.Exception