Class CopySettings (0.20.0)

publicclass CopySettings

Inheritance

java.lang.Object > CopySettings

Constructors

CopySettings(SessionState sessionState)

publicCopySettings(SessionStatesessionState)
Parameter
Name Description
sessionState SessionState

Methods

getCommitPriority()

publicOptions.RpcPrioritygetCommitPriority()

Returns the request priority for commits executed by COPY operations.

Returns
Type Description
com.google.cloud.spanner.Options.RpcPriority

getCommitSizeMultiplier()

publicfloatgetCommitSizeMultiplier()

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
Type Description
float

getCommitTimeoutSeconds()

publicintgetCommitTimeoutSeconds()

Returns the commit timeout for COPY operations in seconds.

Returns
Type Description
int

getMaxAtomicCommitSize()

publicintgetMaxAtomicCommitSize()

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

Returns
Type Description
int

getMaxAtomicMutationsLimit()

publicintgetMaxAtomicMutationsLimit()

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

Returns
Type Description
int

getMaxNonAtomicCommitSize()

publicintgetMaxNonAtomicCommitSize()

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

Returns
Type Description
int

getMaxParallelism()

publicintgetMaxParallelism()

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

Returns
Type Description
int

getNonAtomicBatchSize()

publicintgetNonAtomicBatchSize()

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

Returns
Type Description
int

getPipeBufferSize()

publicintgetPipeBufferSize()

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

Returns
Type Description
int

getSessionState()

publicSessionStategetSessionState()

Returns the SessionState associated with this CopySettings.

Returns
Type Description
SessionState

isCopyUpsert()

publicbooleanisCopyUpsert()

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
Type Description
boolean

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.