core: delete deprecated affinity API. (#3026)

Deprecated since 1.3.0
Resolves #1766
This commit is contained in:
Kun Zhang 2017-05-19 15:04:40 -07:00 committed by GitHub
parent 4fe3660389
commit fae55a67a0
1 changed files with 0 additions and 28 deletions

View File

@ -68,8 +68,6 @@ public final class CallOptions {
@Nullable @Nullable
private CallCredentials credentials; private CallCredentials credentials;
private Attributes affinity = Attributes.EMPTY;
@Nullable @Nullable
private String compressorName; private String compressorName;
@ -156,19 +154,6 @@ public final class CallOptions {
return deadline; 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 <a href="https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md"> * Enables <a href="https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md">
* 'wait for ready'</a> feature for the call. 'Fail fast' is the default option for gRPC calls * 'wait for ready'</a> feature for the call. 'Fail fast' is the default option for gRPC calls
@ -190,17 +175,6 @@ public final class CallOptions {
return newOptions; 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. * Returns the compressor's name.
*/ */
@ -423,7 +397,6 @@ public final class CallOptions {
deadline = other.deadline; deadline = other.deadline;
authority = other.authority; authority = other.authority;
credentials = other.credentials; credentials = other.credentials;
affinity = other.affinity;
executor = other.executor; executor = other.executor;
compressorName = other.compressorName; compressorName = other.compressorName;
customOptions = other.customOptions; customOptions = other.customOptions;
@ -439,7 +412,6 @@ public final class CallOptions {
.add("deadline", deadline) .add("deadline", deadline)
.add("authority", authority) .add("authority", authority)
.add("callCredentials", credentials) .add("callCredentials", credentials)
.add("affinity", affinity)
.add("executor", executor != null ? executor.getClass() : null) .add("executor", executor != null ? executor.getClass() : null)
.add("compressorName", compressorName) .add("compressorName", compressorName)
.add("customOptions", Arrays.deepToString(customOptions)) .add("customOptions", Arrays.deepToString(customOptions))