Class JsonStreamWriter.Builder (2.27.0)

public static final class JsonStreamWriter.Builder

Inheritance

java.lang.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

setCredentialsProvider(CredentialsProvider credentialsProvider)

public JsonStreamWriter.Builder setCredentialsProvider(CredentialsProvider credentialsProvider)

Setter for the underlying StreamWriter's CredentialsProvider.

Parameter
NameDescription
credentialsProviderCredentialsProvider
Returns
TypeDescription
JsonStreamWriter.Builder

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. This feature is still under development, please contact write api team before using.

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)
Parameter
NameDescription
reconnectAfter10Mboolean
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