Interface ServiceCache<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<ServiceInstance<T>> getInstances()
      Return the current list of instances.
      void start()
      The cache must be started before use
      • Methods inherited from interface java.io.Closeable

        close
      • Methods inherited from interface org.apache.curator.framework.listen.Listenable

        addListener, addListener, removeListener
    • Method Detail

      • getInstances

        java.util.List<ServiceInstance<T>> getInstances()
        Return the current list of instances. NOTE: there is no guarantee of freshness. This is merely the last known list of instances. However, the list is updated via a ZooKeeper watcher so it should be fresh within a window of a second or two.
        Specified by:
        getInstances in interface InstanceProvider<T>
        Returns:
        the list
      • start

        void start()
            throws java.lang.Exception
        The cache must be started before use
        Throws:
        java.lang.Exception - errors