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, Duration maxRetryDuration, FlowController.LimitExceededBehavior limitExceededBehavior, String traceId, BigQueryWriteSettings clientSettings)
public ConnectionWorkerPool(long maxInflightRequests, long maxInflightBytes, Duration maxRetryDuration, FlowController.LimitExceededBehavior limitExceededBehavior, String traceId, BigQueryWriteSettings clientSettings)
Name | Description |
maxInflightRequests | long |
maxInflightBytes | long |
maxRetryDuration | Duration |
limitExceededBehavior | LimitExceededBehavior |
traceId | String |
clientSettings | BigQueryWriteSettings |
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 |