Class AsyncRetryingServiceDiscoveryAnnouncer
- java.lang.Object
-
- com.linkedin.venice.servicediscovery.AsyncRetryingServiceDiscoveryAnnouncer
-
- All Implemented Interfaces:
ServiceDiscoveryAnnouncer
public class AsyncRetryingServiceDiscoveryAnnouncer extends java.lang.Object implements ServiceDiscoveryAnnouncer
This class is responsible for announcing and de-announcing aServiceDiscoveryAnnouncer
to a Service Discovery system and taking care of failed registrations by retrying them asynchronously.
-
-
Constructor Summary
Constructors Constructor Description AsyncRetryingServiceDiscoveryAnnouncer(java.util.List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, long serviceDiscoveryRegistrationRetryMS)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
register()
Registers eachServiceDiscoveryAnnouncer
inserviceDiscoveryAnnouncers
.void
unregister()
Unregisters eachServiceDiscoveryAnnouncer
inserviceDiscoveryAnnouncers
.
-
-
-
Constructor Detail
-
AsyncRetryingServiceDiscoveryAnnouncer
public AsyncRetryingServiceDiscoveryAnnouncer(java.util.List<ServiceDiscoveryAnnouncer> serviceDiscoveryAnnouncers, long serviceDiscoveryRegistrationRetryMS)
-
-
Method Detail
-
register
public void register()
Registers eachServiceDiscoveryAnnouncer
inserviceDiscoveryAnnouncers
. 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 interfaceServiceDiscoveryAnnouncer
-
unregister
public void unregister()
Unregisters eachServiceDiscoveryAnnouncer
inserviceDiscoveryAnnouncers
. One reason that a service discovery announcer may fail to unregister is if it was never successfully registered.- Specified by:
unregister
in interfaceServiceDiscoveryAnnouncer
-
-