Search in sources :

Example 6 with ClientCallStreamObserver

use of io.grpc.stub.ClientCallStreamObserver in project pinpoint by naver.

the class DefaultStreamTask method start.

@Override
public void start() {
    this.latch = new CountDownLatch(1);
    StreamJob<ReqT> job = new StreamJob<ReqT>() {

        @Override
        public Future<?> start(final ClientCallStreamObserver<ReqT> requestStream) {
            Runnable runnable = DefaultStreamTask.this.newRunnable(requestStream, latch);
            StreamExecutor<ReqT> streamExecutor = streamExecutorFactory.newStreamExecutor();
            return streamExecutor.execute(runnable);
        }

        @Override
        public String toString() {
            return streamId.toString();
        }
    };
    this.stream = clientStreamingService.newStream(job);
}
Also used : NamedRunnable(com.navercorp.pinpoint.profiler.util.NamedRunnable) CountDownLatch(java.util.concurrent.CountDownLatch) ClientCallStreamObserver(io.grpc.stub.ClientCallStreamObserver)

Aggregations

ClientCallStreamObserver (io.grpc.stub.ClientCallStreamObserver)6 CountDownLatch (java.util.concurrent.CountDownLatch)3 ClientResponseObserver (io.grpc.stub.ClientResponseObserver)2 FileSystemContext (alluxio.client.file.FileSystemContext)1 URIStatus (alluxio.client.file.URIStatus)1 InStreamOptions (alluxio.client.file.options.InStreamOptions)1 OpenLocalBlockRequest (alluxio.grpc.OpenLocalBlockRequest)1 BlockInfo (alluxio.wire.BlockInfo)1 FileInfo (alluxio.wire.FileInfo)1 WorkerNetAddress (alluxio.wire.WorkerNetAddress)1 Empty (com.google.protobuf.Empty)1 PSpanMessage (com.navercorp.pinpoint.grpc.trace.PSpanMessage)1 ResponseStreamObserver (com.navercorp.pinpoint.profiler.sender.grpc.ResponseStreamObserver)1 StreamEventListener (com.navercorp.pinpoint.profiler.sender.grpc.StreamEventListener)1 StreamId (com.navercorp.pinpoint.profiler.sender.grpc.StreamId)1 NamedRunnable (com.navercorp.pinpoint.profiler.util.NamedRunnable)1 ManagedChannel (io.grpc.ManagedChannel)1 StreamObserver (io.grpc.stub.StreamObserver)1 StreamingInputCallRequest (io.grpc.testing.integration.Messages.StreamingInputCallRequest)1 StreamingInputCallResponse (io.grpc.testing.integration.Messages.StreamingInputCallResponse)1