Class AsyncRetryingServiceDiscoveryAnnouncer

java.lang.Object
com.linkedin.venice.servicediscovery.AsyncRetryingServiceDiscoveryAnnouncer
All Implemented Interfaces:
ServiceDiscoveryAnnouncer

public class AsyncRetryingServiceDiscoveryAnnouncer extends Object implements ServiceDiscoveryAnnouncer
This class is responsible for announcing and de-announcing a ServiceDiscoveryAnnouncer to a Service Discovery system and taking care of failed registrations by retrying them asynchronously.
  • Constructor Details

    • AsyncRetryingServiceDiscoveryAnnouncer

      public AsyncRetryingServiceDiscoveryAnnouncer(List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, long serviceDiscoveryRegistrationRetryMS)
  • Method Details

    • register

      public void register()
      Registers each ServiceDiscoveryAnnouncer in serviceDiscoveryAnnouncers. If a service discovery announcer fails to register, it is added to the retry queue and registration will be retried asynchronously in a separate thread.
      Specified by:
      register in interface ServiceDiscoveryAnnouncer
    • unregister

      public void unregister()
      Unregisters each ServiceDiscoveryAnnouncer in serviceDiscoveryAnnouncers. One reason that a service discovery announcer may fail to unregister is if it was never successfully registered.
      Specified by:
      unregister in interface ServiceDiscoveryAnnouncer