Class StreamConnection (3.11.0)

public class StreamConnection

StreamConnection is responsible for writing requests to a GRPC bidirecional connection.

StreamWriter creates a connection. Two callback functions are necessary: request_callback and done_callback. Request callback is used for every request, and done callback is used to notify the user that the connection is closed and no more callbacks will be received from this connection.

The stream writer will accept all the requests without flow control, and makes the callbacks in receiving order.

It's user's responsibility to do the flow control and maintain the lifetime of the requests.

This client lib is deprecated, please use v1 instead.

Inheritance

java.lang.Object > StreamConnection

Constructors

StreamConnection(BigQueryWriteClient client, StreamConnection.RequestCallback requestCallback, StreamConnection.DoneCallback doneCallback) (deprecated)

public StreamConnection(BigQueryWriteClient client, StreamConnection.RequestCallback requestCallback, StreamConnection.DoneCallback doneCallback)
Parameters
Name Description
client BigQueryWriteClient
requestCallback StreamConnection.RequestCallback
doneCallback StreamConnection.DoneCallback

Methods

close() (deprecated)

public void close()

Close the bi-directional stream connection.

send(AppendRowsRequest request) (deprecated)

public void send(AppendRowsRequest request)

Sends a request to the bi-directional stream connection.

Parameter
Name Description
request AppendRowsRequest

request to send.