@Override public Observable<Void> shutdown() { return indexRegistry.shutdown(); }
/** * Return an observable of all matching InstanceInfo for the current registry snapshot, * as {@link ChangeNotification}s * @param interest * @return an observable of all matching InstanceInfo for the current registry snapshot, * as {@link ChangeNotification}s */ @Override public Observable<ChangeNotification<InstanceInfo>> forInterest(Interest<InstanceInfo> interest) { try { // TODO: this method can be run concurrently from different channels, unless we run everything on single server event loop. // It is possible that the same instance info will be both in snapshot and paused notification queue. notificationSubject.pause(); // Pause notifications till we get a snapshot of current registry (registry.values()) if (interest instanceof MultipleInterests) { return indexRegistry.forCompositeInterest((MultipleInterests) interest, this); } else { return indexRegistry.forInterest(interest, notificationSubject, new InstanceInfoInitStateHolder(getSnapshotForInterest(interest))); } } finally { notificationSubject.resume(); } }
@Override public Observable<ChangeNotification<T>> forCompositeInterest(MultipleInterests<T> interest, SourcedEurekaRegistry<T> registry) { return mergeWithBatchRegistryHints(interest, delegateRegistry.forCompositeInterest(interest, registry)); }
@Override public Observable<ChangeNotification<T>> forInterest(Interest<T> interest, Observable<ChangeNotification<T>> dataSource, InitStateHolder<T> initStateHolder) { return mergeWithBatchRegistryHints(interest, delegateRegistry.forInterest(interest, dataSource, initStateHolder)); }
/** * Return an observable of all matching InstanceInfo for the current registry snapshot, * as {@link ChangeNotification}s * @param interest * @return an observable of all matching InstanceInfo for the current registry snapshot, * as {@link ChangeNotification}s */ @Override public Observable<ChangeNotification<InstanceInfo>> forInterest(Interest<InstanceInfo> interest) { try { // TODO: this method can be run concurrently from different channels, unless we run everything on single server event loop. notificationSubject.pause(); // Pause notifications till we get a snapshot of current registry (registry.values()) if (interest instanceof MultipleInterests) { return indexRegistry.forCompositeInterest((MultipleInterests) interest, this); } else { return indexRegistry.forInterest(interest, notificationSubject, new InstanceInfoInitStateHolder(getSnapshotForInterest(interest))); } } finally { notificationSubject.resume(); } }
/** * Return an observable of all matching InstanceInfo for the current registry snapshot, * as {@link ChangeNotification}s * @param interest * @return an observable of all matching InstanceInfo for the current registry snapshot, * as {@link ChangeNotification}s */ @Override public Observable<ChangeNotification<InstanceInfo>> forInterest(Interest<InstanceInfo> interest) { try { // TODO: this method can be run concurrently from different channels, unless we run everything on single server event loop. // It is possible that the same instanceinfo will be both in snapshot and paused notification queue. pauseableSubject.pause(); // Pause notifications till we get a snapshot of current registry (registry.values()) if (interest instanceof MultipleInterests) { return indexRegistry.forCompositeInterest((MultipleInterests) interest, this); } else { return indexRegistry.forInterest(interest, pauseableSubject, new InstanceInfoInitStateHolder(getSnapshotForInterest(interest), interest)); } } finally { pauseableSubject.resume(); } }
@Override public Observable<Void> shutdown() { return indexRegistry.shutdown(); }
@Override public Observable<Void> shutdown(Throwable cause) { return indexRegistry.shutdown(cause); }
@Override public Observable<Void> shutdown(Throwable cause) { remoteBatchingRegistry.shutdown(); return delegateRegistry.shutdown(cause); }
@Override public Observable<Void> shutdown() { remoteBatchingRegistry.shutdown(); return delegateRegistry.shutdown(); }
@Override public Observable<Void> shutdown() { logger.info("Shutting down the eureka registry"); invoker.shutdown(); pauseableSubject.onCompleted(); internalStore.clear(); return indexRegistry.shutdown(); }
@Override public Observable<Void> shutdown(Throwable cause) { invoker.shutdown(); pauseableSubject.onCompleted(); return indexRegistry.shutdown(cause); }