Class ConnectionWorkerPool (2.28.1)

public class ConnectionWorkerPool

Pool of connections to accept appends and distirbute to different connections.

Inheritance

java.lang.Object > ConnectionWorkerPool

Static Methods

enableTestingLogic()

public static void enableTestingLogic()

Enable Test related logic.

setOptions(ConnectionWorkerPool.Settings settings)

public static void setOptions(ConnectionWorkerPool.Settings settings)

Sets static connection pool options.

Note: this method should be triggered prior to the construction of connection pool.

Parameter
NameDescription
settingsConnectionWorkerPool.Settings

Constructors

ConnectionWorkerPool(long maxInflightRequests, long maxInflightBytes, FlowController.LimitExceededBehavior limitExceededBehavior, String traceId, BigQueryWriteClient client, boolean ownsBigQueryWriteClient)

public ConnectionWorkerPool(long maxInflightRequests, long maxInflightBytes, FlowController.LimitExceededBehavior limitExceededBehavior, String traceId, BigQueryWriteClient client, boolean ownsBigQueryWriteClient)
Parameters
NameDescription
maxInflightRequestslong
maxInflightByteslong
limitExceededBehaviorLimitExceededBehavior
traceIdString
clientBigQueryWriteClient
ownsBigQueryWriteClientboolean

Methods

append(StreamWriter streamWriter, ProtoRows rows)

public ApiFuture<AppendRowsResponse> append(StreamWriter streamWriter, ProtoRows rows)

Distributes the writing of a message to an underlying connection.

Parameters
NameDescription
streamWriterStreamWriter
rowsProtoRows
Returns
TypeDescription
ApiFuture<AppendRowsResponse>

append(StreamWriter streamWriter, ProtoRows rows, long offset)

public ApiFuture<AppendRowsResponse> append(StreamWriter streamWriter, ProtoRows rows, long offset)

Distributes the writing of a message to an underlying connection.

Parameters
NameDescription
streamWriterStreamWriter
rowsProtoRows
offsetlong
Returns
TypeDescription
ApiFuture<AppendRowsResponse>

close(StreamWriter streamWriter)

public void close(StreamWriter streamWriter)

Reports the close of the given write stream.

The corresponding worker is not closed until there is no stream reference is targeting to that worker.

Parameter
NameDescription
streamWriterStreamWriter

getInflightWaitSeconds(StreamWriter streamWriter)

public long getInflightWaitSeconds(StreamWriter streamWriter)

Fetch the wait seconds from corresponding worker.

Parameter
NameDescription
streamWriterStreamWriter
Returns
TypeDescription
long