public class CopySettings
Constructors
CopySettings(SessionState sessionState)
public CopySettings(SessionState sessionState)
Parameter | |
---|---|
Name | Description |
sessionState | SessionState |
Methods
getCommitPriority()
public Options.RpcPriority getCommitPriority()
Returns the request priority for commits executed by COPY operations.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
float |
getCommitTimeoutSeconds()
public int getCommitTimeoutSeconds()
Returns the commit timeout for COPY operations in seconds.
Returns | |
---|---|
Type | Description |
int |
getMaxAtomicCommitSize()
public int getMaxAtomicCommitSize()
Returns the maximum number of bytes in a single commit request.
Returns | |
---|---|
Type | Description |
int |
getMaxAtomicMutationsLimit()
public int getMaxAtomicMutationsLimit()
Returns the maximum number of mutations in a single commit request.
Returns | |
---|---|
Type | Description |
int |
getMaxNonAtomicCommitSize()
public int getMaxNonAtomicCommitSize()
Returns the maximum number of bytes in a single commit request for non-atomic COPY operations.
Returns | |
---|---|
Type | Description |
int |
getMaxParallelism()
public int getMaxParallelism()
Returns the maximum number of parallel transactions for a single COPY operation.
Returns | |
---|---|
Type | Description |
int |
getNonAtomicBatchSize()
public int getNonAtomicBatchSize()
Returns the batch size to use for non-atomic COPY operations.
Returns | |
---|---|
Type | Description |
int |
getPipeBufferSize()
public int getPipeBufferSize()
Returns the buffer size to use for incoming COPY data messages.
Returns | |
---|---|
Type | Description |
int |
getSessionState()
public SessionState getSessionState()
Returns the SessionState associated with this CopySettings.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
boolean |