Class JsonStreamWriter.Builder (2.44.1)

public static final class JsonStreamWriter.Builder

Inheritance

Object > JsonStreamWriter.Builder

Methods

build()

public JsonStreamWriter build()

Builds JsonStreamWriter

Returns
TypeDescription
JsonStreamWriter

JsonStreamWriter

Exceptions
TypeDescription
DescriptorValidationException
IllegalArgumentException
IOException
InterruptedException

getStreamName()

public String getStreamName()

Stream name on the builder.

Returns
TypeDescription
String

Builder

setChannelProvider(TransportChannelProvider channelProvider)

public JsonStreamWriter.Builder setChannelProvider(TransportChannelProvider channelProvider)

Setter for the underlying StreamWriter's TransportChannelProvider.

Parameter
NameDescription
channelProviderTransportChannelProvider
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setCompressorName(String compressorName)

public JsonStreamWriter.Builder setCompressorName(String compressorName)

Sets the compression to use for the calls. The compressor must be of type gzip.

Parameter
NameDescription
compressorNameString
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setCredentialsProvider(CredentialsProvider credentialsProvider)

public JsonStreamWriter.Builder setCredentialsProvider(CredentialsProvider credentialsProvider)

Setter for the underlying StreamWriter's CredentialsProvider.

Parameter
NameDescription
credentialsProviderCredentialsProvider
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)

public JsonStreamWriter.Builder setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)

Sets the default missing value interpretation value if the column is not presented in the missing_value_interpretations map.

If this value is set to DEFAULT_VALUE, we will always populate default value if the field is missing from json and default value is defined in the column.

If this value is set to NULL_VALUE, we will always not populate default value.

Parameter
NameDescription
defaultMissingValueInterpretationAppendRowsRequest.MissingValueInterpretation
Returns
TypeDescription
JsonStreamWriter.Builder

setEnableConnectionPool(boolean enableConnectionPool)

public JsonStreamWriter.Builder setEnableConnectionPool(boolean enableConnectionPool)

Enable multiplexing for this writer. In multiplexing mode tables will share the same connection if possible until the connection is overwhelmed.

Parameter
NameDescription
enableConnectionPoolboolean
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setEndpoint(String endpoint)

public JsonStreamWriter.Builder setEndpoint(String endpoint)

Setter for the underlying StreamWriter's Endpoint.

Parameter
NameDescription
endpointString
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setExecutorProvider(ExecutorProvider executorProvider)

public JsonStreamWriter.Builder setExecutorProvider(ExecutorProvider executorProvider)

Setter for the underlying StreamWriter's ExecutorProvider.

Parameter
NameDescription
executorProviderExecutorProvider
Returns
TypeDescription
JsonStreamWriter.Builder

setFlowControlSettings(FlowControlSettings flowControlSettings)

public JsonStreamWriter.Builder setFlowControlSettings(FlowControlSettings flowControlSettings)

Setter for the underlying StreamWriter's FlowControlSettings.

Parameter
NameDescription
flowControlSettingsFlowControlSettings
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setIgnoreUnknownFields(boolean ignoreUnknownFields)

public JsonStreamWriter.Builder setIgnoreUnknownFields(boolean ignoreUnknownFields)

Setter for a ignoreUnkownFields, if true, unknown Json fields to BigQuery will be ignored instead of error out.

Parameter
NameDescription
ignoreUnknownFieldsboolean
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setLocation(String location)

public JsonStreamWriter.Builder setLocation(String location)

Location of the table this stream writer is targeting. Connection pools are shared by location.

Parameter
NameDescription
locationString
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setReconnectAfter10M(boolean reconnectAfter10M)

public JsonStreamWriter.Builder setReconnectAfter10M(boolean reconnectAfter10M)

This parameter is not used. It will be removed soon.

Parameter
NameDescription
reconnectAfter10Mboolean
Returns
TypeDescription
JsonStreamWriter.Builder

setRetrySettings(RetrySettings retrySettings)

public JsonStreamWriter.Builder setRetrySettings(RetrySettings retrySettings)

Sets the RetrySettings to use for in-stream error retry.

Parameter
NameDescription
retrySettingsRetrySettings
Returns
TypeDescription
JsonStreamWriter.Builder

Builder

setTraceId(String traceId)

public JsonStreamWriter.Builder setTraceId(String traceId)

Setter for a traceId to help identify traffic origin.

Parameter
NameDescription
traceIdString
Returns
TypeDescription
JsonStreamWriter.Builder

Builder