Browse Source

More deprecation in Discovery.

These functions will be taken over by ServiceRegistry
pull/152/head
Spencer Gibb 8 years ago
parent
commit
1e447eb9d1
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 10
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java
  2. 2
      spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryLifecycle.java

10
spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java

@ -31,23 +31,25 @@ public interface DiscoveryClient { @@ -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<ServiceInstance> getInstances(String serviceId);
List<ServiceInstance> getInstances(String serviceId);
/**
* @return all known service ids
*/
public List<String> getServices();
List<String> getServices();
}

2
spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryLifecycle.java

@ -21,6 +21,8 @@ import org.springframework.core.Ordered; @@ -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 {
}

Loading…
Cancel
Save