A ChangeStreamMutation represents a list of mods(represented by List<Entry>) targeted at
a single row, which is concatenated by ChangeStreamRecordMerger. It represents a logical
row mutation and can be converted to the original write request(i.e. RowMutation or
RowMutationEntry.
A ChangeStreamMutation can be constructed in two ways, depending on whether it's a user
initiated mutation or a Garbage Collection mutation. Either way, the caller should explicitly set
token and estimatedLowWatermark before build(), otherwise it'll raise an error.
Get the tie breaker of the current mutation. This is used to resolve conflicts when multiple
mutations are applied to different clusters at the same time.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-18 UTC."],[],[],null,["# Class ChangeStreamMutation (2.65.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.65.0 (latest)](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.63.0](/java/docs/reference/google-cloud-bigtable/2.63.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.62.0](/java/docs/reference/google-cloud-bigtable/2.62.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.61.0](/java/docs/reference/google-cloud-bigtable/2.61.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.60.0](/java/docs/reference/google-cloud-bigtable/2.60.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.59.0](/java/docs/reference/google-cloud-bigtable/2.59.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.58.2](/java/docs/reference/google-cloud-bigtable/2.58.2/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.56.0](/java/docs/reference/google-cloud-bigtable/2.56.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.54.0](/java/docs/reference/google-cloud-bigtable/2.54.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.52.0](/java/docs/reference/google-cloud-bigtable/2.52.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.51.2](/java/docs/reference/google-cloud-bigtable/2.51.2/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.49.0](/java/docs/reference/google-cloud-bigtable/2.49.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.46.0](/java/docs/reference/google-cloud-bigtable/2.46.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.45.1](/java/docs/reference/google-cloud-bigtable/2.45.1/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.44.1](/java/docs/reference/google-cloud-bigtable/2.44.1/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.43.0](/java/docs/reference/google-cloud-bigtable/2.43.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.42.0](/java/docs/reference/google-cloud-bigtable/2.42.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.40.0](/java/docs/reference/google-cloud-bigtable/2.40.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.39.5](/java/docs/reference/google-cloud-bigtable/2.39.5/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.37.0](/java/docs/reference/google-cloud-bigtable/2.37.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.35.1](/java/docs/reference/google-cloud-bigtable/2.35.1/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.34.0](/java/docs/reference/google-cloud-bigtable/2.34.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.33.0](/java/docs/reference/google-cloud-bigtable/2.33.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.32.0](/java/docs/reference/google-cloud-bigtable/2.32.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.31.0](/java/docs/reference/google-cloud-bigtable/2.31.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.30.0](/java/docs/reference/google-cloud-bigtable/2.30.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.29.1](/java/docs/reference/google-cloud-bigtable/2.29.1/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation)\n- [2.28.0](/java/docs/reference/google-cloud-bigtable/2.28.0/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation) \n\n public abstract class ChangeStreamMutation implements ChangeStreamRecord, Serializable\n\nA ChangeStreamMutation represents a list of mods(represented by List\\\u003c[Entry](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.Entry)\\\u003e) targeted at\na single row, which is concatenated by ChangeStreamRecordMerger. It represents a logical\nrow mutation and can be converted to the original write request(i.e. [RowMutation](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.RowMutation) or\n[RowMutationEntry](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.RowMutationEntry).\n\nA ChangeStreamMutation can be constructed in two ways, depending on whether it's a user\ninitiated mutation or a Garbage Collection mutation. Either way, the caller should explicitly set\n`token` and `estimatedLowWatermark` before build(), otherwise it'll raise an error.\n\nCase 1) User initiated mutation. \n\n\n ChangeStreamMutation.Builder builder = ChangeStreamMutation.createUserMutation(...);\n builder.setCell(...);\n builder.deleteFamily(...);\n builder.deleteCells(...);\n ChangeStreamMutation changeStreamMutation = builder.setToken(...).setEstimatedLowWatermark().build();\n \nCase 2) Garbage Collection mutation. \n\n\n ChangeStreamMutation.Builder builder = ChangeStreamMutation.createGcMutation(...);\n builder.setCell(...);\n builder.deleteFamily(...);\n builder.deleteCells(...);\n ChangeStreamMutation changeStreamMutation = builder.setToken(...).setEstimatedLowWatermark().build();\n \nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e ChangeStreamMutation \n\nImplements\n----------\n\n[ChangeStreamRecord](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord), [Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html) \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### ChangeStreamMutation()\n\n public ChangeStreamMutation()\n\nMethods\n-------\n\n### getCommitTime()\n\n public abstract Instant getCommitTime()\n\nGet the commit timestamp of the current mutation.\n\n### getCommitTimestamp()\n\n public Instant getCommitTimestamp()\n\n| **Obsolete**\n|\n| *Use getCommitTime() instead*\n|\n| This feature is stable for usage in this major version, but may be deprecated in a future release.\n\nThis method is obsolete. Use [#getCommitTime()](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation#com_google_cloud_bigtable_data_v2_models_ChangeStreamMutation_getCommitTime__) instead.\n\n### getEntries()\n\n public abstract ImmutableList\u003cEntry\u003e getEntries()\n\nGet the list of mods of the current mutation.\n\n### getEstimatedLowWatermark()\n\n public Instant getEstimatedLowWatermark()\n\n| **Obsolete**\n|\n| *Use getEstimatedLowWatermarkTime() instead*\n|\n| This feature is stable for usage in this major version, but may be deprecated in a future release.\n\nThis method is obsolete. Use [#getEstimatedLowWatermarkTime()](/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation#com_google_cloud_bigtable_data_v2_models_ChangeStreamMutation_getEstimatedLowWatermarkTime__) instead.\n\n### getEstimatedLowWatermarkTime()\n\n public abstract Instant getEstimatedLowWatermarkTime()\n\nGet the low watermark of the current mutation.\n\n### getRowKey()\n\n public abstract ByteString getRowKey()\n\nGet the row key of the current mutation.\n\n### getSourceClusterId()\n\n public abstract String getSourceClusterId()\n\nGet the source cluster id of the current mutation.\n\n### getTieBreaker()\n\n public abstract int getTieBreaker()\n\nGet the tie breaker of the current mutation. This is used to resolve conflicts when multiple\nmutations are applied to different clusters at the same time.\n\n### getToken()\n\n public abstract String getToken()\n\nGet the token of the current mutation, which can be used to resume the changestream.\n\n### getType()\n\n public abstract ChangeStreamMutation.MutationType getType()\n\nGet the type of the current mutation.\n\n### toRowMutation(String tableId)\n\n public RowMutation toRowMutation(String tableId)\n\n### toRowMutationEntry()\n\n public RowMutationEntry toRowMutationEntry()"]]