Class MutationGroup
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.MutationGroup
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<com.google.cloud.spanner.Mutation>
public final class MutationGroup extends java.lang.Object implements java.io.Serializable, java.lang.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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<com.google.cloud.spanner.Mutation>attached()static MutationGroupcreate(com.google.cloud.spanner.Mutation primary, com.google.cloud.spanner.Mutation... other)Creates a new group.static MutationGroupcreate(com.google.cloud.spanner.Mutation primary, java.lang.Iterable<com.google.cloud.spanner.Mutation> other)booleanequals(@Nullable java.lang.Object o)inthashCode()java.util.Iterator<com.google.cloud.spanner.Mutation>iterator()com.google.cloud.spanner.Mutationprimary()longsize()java.lang.StringtoString()
-
-
-
Method Detail
-
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, java.lang.Iterable<com.google.cloud.spanner.Mutation> other)
-
iterator
public java.util.Iterator<com.google.cloud.spanner.Mutation> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<com.google.cloud.spanner.Mutation>
-
size
public long size()
-
primary
public com.google.cloud.spanner.Mutation primary()
-
attached
public java.util.List<com.google.cloud.spanner.Mutation> attached()
-
equals
public boolean equals(@Nullable java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-