Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: ManagedChannelImpl2. #2530

Merged
merged 15 commits into from
Jan 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/main/java/io/grpc/internal/ClientCallImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ interface ClientTransportProvider {
/**
* Returns a transport for a new call.
*/
ClientTransport get(CallOptions callOptions);
ClientTransport get(CallOptions callOptions, Metadata headers);
}

ClientCallImpl<ReqT, RespT> setDecompressorRegistry(DecompressorRegistry decompressorRegistry) {
Expand Down Expand Up @@ -215,7 +215,7 @@ public void runInContext() {
if (!deadlineExceeded) {
updateTimeoutHeaders(effectiveDeadline, callOptions.getDeadline(),
context.getDeadline(), headers);
ClientTransport transport = clientTransportProvider.get(callOptions);
ClientTransport transport = clientTransportProvider.get(callOptions, headers);
Context origContext = context.attach();
try {
stream = transport.newStream(method, headers, callOptions, statsTraceCtx);
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/io/grpc/internal/ManagedChannelImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import io.grpc.EquivalentAddressGroup;
import io.grpc.LoadBalancer;
import io.grpc.ManagedChannel;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.NameResolver;
import io.grpc.ResolvedServerInfoGroup;
Expand Down Expand Up @@ -359,7 +360,7 @@ private void rescheduleIdleTimer() {

private final ClientTransportProvider transportProvider = new ClientTransportProvider() {
@Override
public ClientTransport get(CallOptions callOptions) {
public ClientTransport get(CallOptions callOptions, Metadata headers) {
LoadBalancer<ClientTransport> balancer = loadBalancer;
if (balancer == null) {
// Current state is either idle or in grace period
Expand Down
Loading