@Test public void should_not_update_on_non_relevant_event() { events.next(new InstanceInfoChangedEvent(instance.getId(), instance.getVersion(), Info.empty())); verify(updater, never()).updateStatus(instance.getId()); }
protected Mono<Void> updateStatus(InstanceId instanceId) { return statusUpdater.updateStatus(instanceId).doFinally(s -> lastQueried.put(instanceId, Instant.now())); }
StatusUpdateTrigger extends AbstractEventHandler<InstanceEvent> { protected Mono<Void> updateStatus(InstanceId instanceId) { return statusUpdater.updateStatus(instanceId).doFinally(s -> lastQueried.put(instanceId, Instant.now())); } }
StatusUpdateTrigger extends AbstractEventHandler<InstanceEvent> { protected Mono<Void> updateStatus(InstanceId instanceId) { return statusUpdater.updateStatus(instanceId).doFinally(s -> lastQueried.put(instanceId, Instant.now())); } StatusUpdateTrigger(StatusUpdater statusUpdater, Publisher<InstanceEvent> publisher); }
StatusUpdateTrigger extends AbstractEventHandler<InstanceEvent> { protected Mono<Void> updateStatus(InstanceId instanceId) { return statusUpdater.updateStatus(instanceId).doFinally(s -> lastQueried.put(instanceId, Instant.now())); } StatusUpdateTrigger(StatusUpdater statusUpdater, Publisher<InstanceEvent> publisher); @Override void start(); @Override void stop(); void setUpdateInterval(Duration updateInterval); void setStatusLifetime(Duration statusLifetime); }
StatusUpdateTrigger extends AbstractEventHandler<InstanceEvent> { protected Mono<Void> updateStatus(InstanceId instanceId) { return statusUpdater.updateStatus(instanceId).doFinally(s -> lastQueried.put(instanceId, Instant.now())); } StatusUpdateTrigger(StatusUpdater statusUpdater, Publisher<InstanceEvent> publisher); @Override void start(); @Override void stop(); void setUpdateInterval(Duration updateInterval); void setStatusLifetime(Duration statusLifetime);  }