From fae55a67a0f03c0f3ad0ca0d9e4007b9872be9b4 Mon Sep 17 00:00:00 2001 From: Kun Zhang Date: Fri, 19 May 2017 15:04:40 -0700 Subject: [PATCH] core: delete deprecated affinity API. (#3026) Deprecated since 1.3.0 Resolves #1766 --- core/src/main/java/io/grpc/CallOptions.java | 28 --------------------- 1 file changed, 28 deletions(-) diff --git a/core/src/main/java/io/grpc/CallOptions.java b/core/src/main/java/io/grpc/CallOptions.java index 6944a3c35d..49184d6d71 100644 --- a/core/src/main/java/io/grpc/CallOptions.java +++ b/core/src/main/java/io/grpc/CallOptions.java @@ -68,8 +68,6 @@ public final class CallOptions { @Nullable private CallCredentials credentials; - private Attributes affinity = Attributes.EMPTY; - @Nullable private String compressorName; @@ -156,19 +154,6 @@ public final class CallOptions { return deadline; } - /** - * Returns a new {@code CallOptions} with attributes for affinity-based routing. - * - * @deprecated use {@link #withOption(Key, Object)}. - */ - @Deprecated - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766") - public CallOptions withAffinity(Attributes affinity) { - CallOptions newOptions = new CallOptions(this); - newOptions.affinity = Preconditions.checkNotNull(affinity, "affinity"); - return newOptions; - } - /** * Enables * 'wait for ready' feature for the call. 'Fail fast' is the default option for gRPC calls @@ -190,17 +175,6 @@ public final class CallOptions { return newOptions; } - /** - * Returns the attributes for affinity-based routing. - * - * @deprecated use {@link #getOption(Key)}. - */ - @Deprecated - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1766") - public Attributes getAffinity() { - return affinity; - } - /** * Returns the compressor's name. */ @@ -423,7 +397,6 @@ public final class CallOptions { deadline = other.deadline; authority = other.authority; credentials = other.credentials; - affinity = other.affinity; executor = other.executor; compressorName = other.compressorName; customOptions = other.customOptions; @@ -439,7 +412,6 @@ public final class CallOptions { .add("deadline", deadline) .add("authority", authority) .add("callCredentials", credentials) - .add("affinity", affinity) .add("executor", executor != null ? executor.getClass() : null) .add("compressorName", compressorName) .add("customOptions", Arrays.deepToString(customOptions))