Class AsyncResolver<T extends EurekaEndpoint>

  • All Implemented Interfaces:
    ClosableResolver<T>, ClusterResolver<T>

    public class AsyncResolver<T extends EurekaEndpoint>
    extends java.lang.Object
    implements ClosableResolver<T>
    An async resolver that keeps a cached version of the endpoint list value for gets, and updates this cache periodically in a different thread.
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncResolver​(java.lang.String name, ClusterResolver<T> delegate, int executorThreadPoolSize, int refreshIntervalMs, int warmUpTimeoutMs)
      Create an async resolver with an empty initial value.
      AsyncResolver​(java.lang.String name, ClusterResolver<T> delegate, java.util.List<T> initialValues, int executorThreadPoolSize, int refreshIntervalMs)
      Create an async resolver with a preset initial value.
    • Constructor Detail

      • AsyncResolver

        public AsyncResolver​(java.lang.String name,
                             ClusterResolver<T> delegate,
                             int executorThreadPoolSize,
                             int refreshIntervalMs,
                             int warmUpTimeoutMs)
        Create an async resolver with an empty initial value. When this resolver is called for the first time, an initial warm up will be executed before scheduling the periodic update task.
      • AsyncResolver

        public AsyncResolver​(java.lang.String name,
                             ClusterResolver<T> delegate,
                             java.util.List<T> initialValues,
                             int executorThreadPoolSize,
                             int refreshIntervalMs)
        Create an async resolver with a preset initial value. WHen this resolver is called for the first time, there will be no warm up and the initial value will be returned. The periodic update task will not be scheduled until after the first time getClusterEndpoints call.