mirror of https://github.com/grpc/grpc-java.git
core: delete deprecated pickSubchannel() (#2849)
The deprecation happens in 1.2.0. Now we can delete it for the next release.
This commit is contained in:
parent
3f35ea69df
commit
c14c5dda63
|
|
@ -203,29 +203,12 @@ public abstract class LoadBalancer {
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public abstract static class SubchannelPicker {
|
public abstract static class SubchannelPicker {
|
||||||
/**
|
|
||||||
* Make a balancing decision for a new RPC.
|
|
||||||
*
|
|
||||||
* @param affinity the affinity attributes provided via {@link CallOptions#withAffinity}
|
|
||||||
* @param headers the headers container of the RPC. It can be mutated within this method.
|
|
||||||
* @deprecated this signature is going to be removed in the next minor release. Implementations
|
|
||||||
* should instead override the {@link #pickSubchannel(LoadBalancer.PickSubchannelArgs)}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public PickResult pickSubchannel(Attributes affinity, Metadata headers) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a balancing decision for a new RPC.
|
* Make a balancing decision for a new RPC.
|
||||||
*
|
*
|
||||||
* @param args the pick arguments
|
* @param args the pick arguments
|
||||||
*/
|
*/
|
||||||
// TODO(lukaszx0) make it abstract once deprecated overload will be removed.
|
public abstract PickResult pickSubchannel(PickSubchannelArgs args);
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public PickResult pickSubchannel(PickSubchannelArgs args) {
|
|
||||||
return pickSubchannel(args.getCallOptions().getAffinity(), args.getHeaders());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue