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 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class CopySettings (0.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.27.1 (latest)](/java/docs/reference/pgadapter/latest/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.27.0](/java/docs/reference/pgadapter/0.27.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.26.0](/java/docs/reference/pgadapter/0.26.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.25.0](/java/docs/reference/pgadapter/0.25.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.24.0](/java/docs/reference/pgadapter/0.24.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.23.1](/java/docs/reference/pgadapter/0.23.1/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.22.1](/java/docs/reference/pgadapter/0.22.1/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.21.0](/java/docs/reference/pgadapter/0.21.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.20.0](/java/docs/reference/pgadapter/0.20.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.19.1](/java/docs/reference/pgadapter/0.19.1/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.18.4](/java/docs/reference/pgadapter/0.18.4/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.17.0](/java/docs/reference/pgadapter/0.17.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.16.0](/java/docs/reference/pgadapter/0.16.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.15.0](/java/docs/reference/pgadapter/0.15.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.14.1](/java/docs/reference/pgadapter/0.14.1/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.9.0](/java/docs/reference/pgadapter/0.9.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.8.0](/java/docs/reference/pgadapter/0.8.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.7.0](/java/docs/reference/pgadapter/0.7.0/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.6.1](/java/docs/reference/pgadapter/0.6.1/com.google.cloud.spanner.pgadapter.session.CopySettings)\n- [0.5.1](/java/docs/reference/pgadapter/0.5.1/com.google.cloud.spanner.pgadapter.session.CopySettings) \n\n public class CopySettings\n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e CopySettings \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### CopySettings(SessionState sessionState)\n\n public CopySettings(SessionState sessionState)\n\nMethods\n-------\n\n### getCommitPriority()\n\n public Options.RpcPriority getCommitPriority()\n\nReturns the request priority for commits executed by COPY operations.\n\n### getCommitSizeMultiplier()\n\n public float getCommitSizeMultiplier()\n\nReturns the multiplier that will be applied to the calculated commit size to ensure that a\ncommit request in a non-atomic COPY operation does not exceed the fixed commit size limit of\nCloud Spanner.\n\n### getCommitTimeoutSeconds()\n\n public int getCommitTimeoutSeconds()\n\nReturns the commit timeout for COPY operations in seconds.\n\n### getMaxAtomicCommitSize()\n\n public int getMaxAtomicCommitSize()\n\nReturns the maximum number of bytes in a single commit request.\n\n### getMaxAtomicMutationsLimit()\n\n public int getMaxAtomicMutationsLimit()\n\nReturns the maximum number of mutations in a single commit request.\n\n### getMaxNonAtomicCommitSize()\n\n public int getMaxNonAtomicCommitSize()\n\nReturns the maximum number of bytes in a single commit request for non-atomic COPY operations.\n\n### getMaxParallelism()\n\n public int getMaxParallelism()\n\nReturns the maximum number of parallel transactions for a single COPY operation.\n\n### getNonAtomicBatchSize()\n\n public int getNonAtomicBatchSize()\n\nReturns the batch size to use for non-atomic COPY operations.\n\n### getPipeBufferSize()\n\n public int getPipeBufferSize()\n\nReturns the buffer size to use for incoming COPY data messages.\n\n### getSessionState()\n\n public SessionState getSessionState()\n\nReturns the [SessionState](/java/docs/reference/pgadapter/latest/com.google.cloud.spanner.pgadapter.session.SessionState) associated with this [CopySettings](/java/docs/reference/pgadapter/latest/com.google.cloud.spanner.pgadapter.session.CopySettings).\n\n### isCopyUpsert()\n\n public boolean isCopyUpsert()\n\nReturns whether COPY operations should use upsert instead of insert.\n\nCOPY will INSERT records by default. This is consistent with how COPY on PostgreSQL works.\nThis option allows PGAdapter to use InsertOrUpdate instead. This can be slightly more efficient\nfor bulk uploading, and it makes it easier to retry a failed non-atomic batch that might have\nalready uploaded some but not all data."]]