Class MutationGroup

java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.MutationGroup
All Implemented Interfaces:
Serializable, Iterable<com.google.cloud.spanner.Mutation>

public final class MutationGroup extends Object implements Serializable, Iterable<com.google.cloud.spanner.Mutation>
A bundle of mutations that must be submitted atomically.

One of the mutations is chosen to be "primary", and can be used to determine partitions.

See Also:
  • Method Details

    • create

      public static MutationGroup create(com.google.cloud.spanner.Mutation primary, com.google.cloud.spanner.Mutation... other)
      Creates a new group.
      Parameters:
      primary - a primary mutation.
      other - other mutations, usually interleaved in parent.
      Returns:
      new mutation group.
    • create

      public static MutationGroup create(com.google.cloud.spanner.Mutation primary, Iterable<com.google.cloud.spanner.Mutation> other)
    • iterator

      public Iterator<com.google.cloud.spanner.Mutation> iterator()
      Specified by:
      iterator in interface Iterable<com.google.cloud.spanner.Mutation>
    • size

      public long size()
    • primary

      public com.google.cloud.spanner.Mutation primary()
    • attached

      public List<com.google.cloud.spanner.Mutation> attached()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object