Skip to content
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
7 changes: 4 additions & 3 deletions cronet/src/main/java/io/grpc/cronet/CronetClientStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class CronetClientStream extends AbstractClientStream {
MethodDescriptor<?, ?> method,
StatsTraceContext statsTraceCtx,
CallOptions callOptions) {
super(new CronetWritableBufferAllocator(), statsTraceCtx, headers, method.isSafe());
super(new CronetWritableBufferAllocator(), statsTraceCtx, null, headers, method.isSafe());
this.url = Preconditions.checkNotNull(url, "url");
this.userAgent = Preconditions.checkNotNull(userAgent, "userAgent");
this.executor = Preconditions.checkNotNull(executor, "executor");
Expand Down Expand Up @@ -155,7 +155,8 @@ public void writeHeaders(Metadata metadata, byte[] payload) {
}

@Override
public void writeFrame(WritableBuffer buffer, boolean endOfStream, boolean flush) {
public void writeFrame(
WritableBuffer buffer, boolean endOfStream, boolean flush, int numMessages) {
synchronized (state.lock) {
if (state.cancelSent) {
return;
Expand Down Expand Up @@ -218,7 +219,7 @@ class TransportState extends Http2ClientStreamTransportState {
private boolean readClosed;

public TransportState(int maxMessageSize, StatsTraceContext statsTraceCtx, Object lock) {
super(maxMessageSize, statsTraceCtx);
super(maxMessageSize, statsTraceCtx, null);
this.lock = Preconditions.checkNotNull(lock, "lock");
}

Expand Down
10 changes: 10 additions & 0 deletions cronet/src/main/java/io/grpc/cronet/CronetClientTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.grpc.cronet;

import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.SettableFuture;
import io.grpc.Attributes;
import io.grpc.CallOptions;
import io.grpc.Metadata;
Expand All @@ -28,12 +29,14 @@
import io.grpc.internal.GrpcUtil;
import io.grpc.internal.LogId;
import io.grpc.internal.StatsTraceContext;
import io.grpc.internal.TransportTracer;
import io.grpc.internal.WithLogId;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import javax.annotation.Nullable;
import javax.annotation.concurrent.GuardedBy;

Expand Down Expand Up @@ -87,6 +90,13 @@ class CronetClientTransport implements ConnectionClientTransport, WithLogId {
this.streamFactory = Preconditions.checkNotNull(streamFactory, "streamFactory");
}

@Override
public Future<TransportTracer.Stats> getTransportStats() {
SettableFuture<TransportTracer.Stats> f = SettableFuture.create();
f.set(null);
return f;
}

@Override
public CronetClientStream newStream(final MethodDescriptor<?, ?> method, final Metadata headers,
final CallOptions callOptions) {
Expand Down