Interface ServiceLocator

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DiscoveryServiceLocator, FixedServiceLocator, SpecificTaskServiceLocator

public interface ServiceLocator extends Closeable
Used by ServiceClient to locate services. Thread-safe.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    com.google.common.util.concurrent.ListenableFuture<ServiceLocations>
    Returns a future that resolves to a set of ServiceLocation.
  • Method Details

    • locate

      com.google.common.util.concurrent.ListenableFuture<ServiceLocations> locate()
      Returns a future that resolves to a set of ServiceLocation. If the returned object returns true from ServiceLocations.isClosed(), it means the service has closed permanently. Otherwise, any of the returned locations in ServiceLocations.getLocations() is a viable selection. It is possible for the list of locations to be empty. This means that the service is not currently available, but also has not been closed, so it may become available at some point in the future.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable