src/main/java/io/mantisrx/api/services/JobDiscoveryService.java
@Override
        public void close() {
            if (log.isDebugEnabled()) { log.debug("In Close un-subscribing...." + subscription.isUnsubscribed()); }
            if (inited.get() && subscription != null && !subscription.isUnsubscribed()) {
                if (log.isDebugEnabled()) { log.debug("Unsubscribing...."); }
                subscription.unsubscribe();
                inited.set(false);
                initComplete = new CountDownLatch(1);
            }
            cleanupCounter.increment();
            log.info("jobDiscoveryInfo close for {}", lookupKey);
            this.doOnZeroConnections.call(this.lookupKey);
        }
/**
         * Invoked If schedulingInfo Observable Completes or throws an onError of if the subscription count falls to 0
         * Unsubscribes from the schedulingInfoObservable and invokes doOnZeroConnection callback
         */
Invoked If schedulingInfo Observable Completes or throws an onError of if the subscription count falls to 0
Unsubscribes from the schedulingInfoObservable and invokes doOnZeroConnection callback
Invoked If schedulingInfo Observable Completes or throws an onError of if the subscription count falls to 0 Unsubscribes from the schedulingInfoObservable and invokes doOnZeroConnection callback
@Override
        public void close() {
            if (log.isDebugEnabled()) { log.debug("In Close un-subscribing...." + subscription.isUnsubscribed()); }
            if (inited.get() && subscription != null && !subscription.isUnsubscribed()) {
                if (log.isDebugEnabled()) { log.debug("Unsubscribing...."); }
                subscription.unsubscribe();
                inited.set(false);
                initComplete = new CountDownLatch(1);
            }
            cleanupCounter.increment();
            log.info("jobDiscoveryInfo close for {}", lookupKey);
            this.doOnZeroConnections.call(this.lookupKey);
        }
@ Override public void close ( ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "In Close un-subscribing...." + subscription . isUnsubscribed ( ) ) ; } if ( inited . get ( ) && subscription != null && ! subscription . isUnsubscribed ( ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Unsubscribing...." ) ; } subscription . unsubscribe ( ) ; inited . set ( false ) ; initComplete = new CountDownLatch ( 1 ) ; } cleanupCounter . increment ( ) ; log . info ( "jobDiscoveryInfo close for {}" , lookupKey ) ; this . doOnZeroConnections . call ( this . lookupKey ) ; }
Invoked If schedulingInfo Observable Completes or throws an onError of if the subscription count falls to 0
 Unsubscribes from the schedulingInfoObservable and invokes doOnZeroConnection callback
Invoked If schedulingInfo Observable Completes or throws an onError of if the subscription count falls to 0 Unsubscribes from the schedulingInfoObservable and invokes doOnZeroConnection callback