mirror of https://github.com/grpc/grpc-java.git
core: delete deprecated affinity API. (#3026)
Deprecated since 1.3.0 Resolves #1766
This commit is contained in:
parent
4fe3660389
commit
fae55a67a0
|
|
@ -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 <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
|
||||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue