@Test public void testBasic() { assertAnnounced(); announcer.start(); assertAnnounced(serviceAnnouncement); }
@Override public void start() { checkState(!executor.isShutdown(), "Announcer has been destroyed"); if (started.compareAndSet(false, true)) { announce(); } }
AnnouncerImpl implements Announcer { @Override public void start() { checkState(!executor.isShutdown(), "Announcer has been destroyed"); if (started.compareAndSet(false, true)) { announce(); } } }
AnnouncerImpl implements Announcer { @Override public void start() { checkState(!executor.isShutdown(), "Announcer has been destroyed"); if (started.compareAndSet(false, true)) { announce(); } } @Inject  AnnouncerImpl(DiscoveryAnnouncementClient announcementClient, Set<ServiceAnnouncement> serviceAnnouncements); }
AnnouncerImpl implements Announcer { @Override public void start() { checkState(!executor.isShutdown(), "Announcer has been destroyed"); if (started.compareAndSet(false, true)) { announce(); } } @Inject  AnnouncerImpl(DiscoveryAnnouncementClient announcementClient, Set<ServiceAnnouncement> serviceAnnouncements); @Override void start(); @Override void startIfNotKubernetes(); @Override @StopTraffic void destroy(); @Override void addServiceAnnouncement(ServiceAnnouncement serviceAnnouncement); @Override void removeServiceAnnouncement(UUID serviceId); @Override ListenableFuture<?> forceAnnounce(); }
AnnouncerImpl implements Announcer { @Override public void start() { checkState(!executor.isShutdown(), "Announcer has been destroyed"); if (started.compareAndSet(false, true)) { announce(); } } @Inject  AnnouncerImpl(DiscoveryAnnouncementClient announcementClient, Set<ServiceAnnouncement> serviceAnnouncements); @Override void start(); @Override void startIfNotKubernetes(); @Override @StopTraffic void destroy(); @Override void addServiceAnnouncement(ServiceAnnouncement serviceAnnouncement); @Override void removeServiceAnnouncement(UUID serviceId); @Override ListenableFuture<?> forceAnnounce();  }