@Override public void leave() { final ServiceQueue serviceQueue = serviceContext().currentService(); leaveEventBus(serviceQueue); }
private void loadIfEmpty() { serviceContext.ifEmpty(() -> { serviceContext = ofNullable(ServiceContext.serviceContext()); serviceContext.ifPresent(serviceContext1 -> serviceQueue = ofNullable(serviceContext1.currentService())); }); }
@Override public void leave() { final ServiceQueue serviceQueue = serviceContext().currentService(); leaveEventBus(serviceQueue); }
@Override public void leave() { final ServiceQueue serviceQueue = serviceContext().currentService(); leaveEventBus(serviceQueue); }
private void loadIfEmpty() { serviceContext.ifEmpty(() -> { serviceContext = ofNullable(ServiceContext.serviceContext()); serviceContext.ifPresent(serviceContext1 -> serviceQueue = ofNullable(serviceContext1.currentService())); }); }
private void check() { now = timer.now(); long duration = now - lastCheckTime; if (duration > checkInIntervalMS) { lastCheckTime = now; final ServiceQueue serviceQueue = ServiceContext.serviceContext().currentService(); boolean failing = serviceQueue.failing(); if (!failing) { healthServiceAsync.checkInOk(serviceName); } else { healthServiceAsync.checkIn(serviceName, HealthStatus.FAIL); } healthServiceAsync.clientProxyFlush(); } }