public class ConnectionWorkerPool
Pool of connections to accept appends and distirbute to different connections.
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.
Name | Description |
settings | ConnectionWorkerPool.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)
Name | Description |
maxInflightRequests | long |
maxInflightBytes | long |
limitExceededBehavior | LimitExceededBehavior |
traceId | String |
client | BigQueryWriteClient |
ownsBigQueryWriteClient | boolean |
Methods
append(StreamWriter streamWriter, ProtoRows rows)
public ApiFuture<AppendRowsResponse> append(StreamWriter streamWriter, ProtoRows rows)
Distributes the writing of a message to an underlying connection.
Name | Description |
streamWriter | StreamWriter |
rows | ProtoRows |
Type | Description |
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.
Name | Description |
streamWriter | StreamWriter |
rows | ProtoRows |
offset | long |
Type | Description |
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.
Name | Description |
streamWriter | StreamWriter |
getInflightWaitSeconds(StreamWriter streamWriter)
public long getInflightWaitSeconds(StreamWriter streamWriter)
Fetch the wait seconds from corresponding worker.
Name | Description |
streamWriter | StreamWriter |
Type | Description |
long |