From 1e447eb9d1ef9ef42595dfda526d38d12cf40bd6 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 8 Dec 2016 09:49:43 -0700 Subject: [PATCH] More deprecation in Discovery. These functions will be taken over by ServiceRegistry --- .../cloud/client/discovery/DiscoveryClient.java | 10 ++++++---- .../cloud/client/discovery/DiscoveryLifecycle.java | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java index 285876cf..8555c72d 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java @@ -31,23 +31,25 @@ public interface DiscoveryClient { * A human readable description of the implementation, used in HealthIndicator * @return the description */ - public String description(); + String description(); /** + * @deprecated use the {@link org.springframework.cloud.client.serviceregistry.Registration} bean instead + * * @return ServiceInstance with information used to register the local service */ - public ServiceInstance getLocalServiceInstance(); + ServiceInstance getLocalServiceInstance(); /** * Get all ServiceInstances associated with a particular serviceId * @param serviceId the serviceId to query * @return a List of ServiceInstance */ - public List getInstances(String serviceId); + List getInstances(String serviceId); /** * @return all known service ids */ - public List getServices(); + List getServices(); } diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryLifecycle.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryLifecycle.java index d7a8f4e3..cd7252b1 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryLifecycle.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryLifecycle.java @@ -21,6 +21,8 @@ import org.springframework.core.Ordered; /** * @author Spencer Gibb + * @deprecated use {@link org.springframework.cloud.client.serviceregistry.AutoServiceRegistration} instead. This class will be removed in the next release train. */ +@Deprecated public interface DiscoveryLifecycle extends SmartLifecycle, Ordered { }