Class CopySettings (0.20.0)

public class CopySettings

Inheritance

java.lang.Object > CopySettings

Constructors

CopySettings(SessionState sessionState)

public CopySettings(SessionState sessionState)
Parameter
NameDescription
sessionStateSessionState

Methods

getCommitPriority()

public Options.RpcPriority getCommitPriority()

Returns the request priority for commits executed by COPY operations.

Returns
TypeDescription
com.google.cloud.spanner.Options.RpcPriority

getCommitSizeMultiplier()

public float getCommitSizeMultiplier()

Returns the multiplier that will be applied to the calculated commit size to ensure that a commit request in a non-atomic COPY operation does not exceed the fixed commit size limit of Cloud Spanner.

Returns
TypeDescription
float

getCommitTimeoutSeconds()

public int getCommitTimeoutSeconds()

Returns the commit timeout for COPY operations in seconds.

Returns
TypeDescription
int

getMaxAtomicCommitSize()

public int getMaxAtomicCommitSize()

Returns the maximum number of bytes in a single commit request.

Returns
TypeDescription
int

getMaxAtomicMutationsLimit()

public int getMaxAtomicMutationsLimit()

Returns the maximum number of mutations in a single commit request.

Returns
TypeDescription
int

getMaxNonAtomicCommitSize()

public int getMaxNonAtomicCommitSize()

Returns the maximum number of bytes in a single commit request for non-atomic COPY operations.

Returns
TypeDescription
int

getMaxParallelism()

public int getMaxParallelism()

Returns the maximum number of parallel transactions for a single COPY operation.

Returns
TypeDescription
int

getNonAtomicBatchSize()

public int getNonAtomicBatchSize()

Returns the batch size to use for non-atomic COPY operations.

Returns
TypeDescription
int

getPipeBufferSize()

public int getPipeBufferSize()

Returns the buffer size to use for incoming COPY data messages.

Returns
TypeDescription
int

getSessionState()

public SessionState getSessionState()

Returns the SessionState associated with this CopySettings.

Returns
TypeDescription
SessionState

isCopyUpsert()

public boolean isCopyUpsert()

Returns whether COPY operations should use upsert instead of insert.

COPY will INSERT records by default. This is consistent with how COPY on PostgreSQL works. This option allows PGAdapter to use InsertOrUpdate instead. This can be slightly more efficient for bulk uploading, and it makes it easier to retry a failed non-atomic batch that might have already uploaded some but not all data.

Returns
TypeDescription
boolean