Class Mutation

    • Method Detail

      • create

        public static Mutation create()
        Creates new instance of Mutation object.
      • createUnsafe

        @BetaApi
        public static Mutation createUnsafe()
        Creates new instance of Mutation object which allows setCell operation to use server side timestamp. This is dangerous because mutations will no longer be idempotent, which might cause multiple duplicate values to be stored in Bigtable. This option should only be used for advanced usecases with extreme care.
      • fromProtoUnsafe

        @BetaApi
        public static Mutation fromProtoUnsafe​(List<Mutation> protos)
        Wraps the List of protobuf Mutation. This methods, like createUnsafe(), allows setCell operation to use server side timestamp. This is dangerous because mutations will no longer be idempotent, which might cause multiple duplicate values to be stored in Bigtable. This option should only be used for advanced usecases with extreme care.
      • fromProtoUnsafe

        @BetaApi
        public static Mutation fromProtoUnsafe​(Iterable<Mutation> protos)
        Wraps the List of protobuf Mutation. This methods, like createUnsafe(), allows setCell operation to use server side timestamp. This is dangerous because mutations will no longer be idempotent, which might cause multiple duplicate values to be stored in Bigtable. This option should only be used for advanced usecases with extreme care.
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                String qualifier,
                                long timestamp,
                                @Nonnull
                                String value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        This is a convenience override that converts Strings to ByteStrings.

        Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                com.google.protobuf.ByteString qualifier,
                                @Nonnull
                                com.google.protobuf.ByteString value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        Uses microseconds since epoch as the timestamp.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                com.google.protobuf.ByteString qualifier,
                                long timestamp,
                                @Nonnull
                                com.google.protobuf.ByteString value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                String qualifier,
                                long value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        This a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp. Also it accepts long value.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                String qualifier,
                                long timestamp,
                                long value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        This is a convenience override that converts Strings to ByteStrings.

        Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                com.google.protobuf.ByteString qualifier,
                                long value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        Uses microseconds since epoch as the timestamp.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • setCell

        public Mutation setCell​(@Nonnull
                                String familyName,
                                @Nonnull
                                com.google.protobuf.ByteString qualifier,
                                long timestamp,
                                long value)
        Description copied from interface: MutationApi
        Adds a mutation which sets the value of the specified cell.

        Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.

        Specified by:
        setCell in interface MutationApi<Mutation>
      • deleteCells

        public Mutation deleteCells​(@Nonnull
                                    String familyName,
                                    @Nonnull
                                    com.google.protobuf.ByteString qualifier,
                                    @Nonnull
                                    Range.TimestampRange timestampRange)
        Description copied from interface: MutationApi
        Adds a mutation which deletes cells from the specified column, restricted to a given timestamp range.
        Specified by:
        deleteCells in interface MutationApi<Mutation>
        Parameters:
        familyName - The family name.
        qualifier - The qualifier.
        timestampRange - The timestamp range in microseconds.