Google Cloud Bigtable C++ Client  2.1.0
A C++ Client Library for Google Cloud Bigtable
Public Member Functions | List of all members
google::cloud::bigtable::AlwaysRetryMutationPolicy Class Reference

Implements a policy that retries all mutations. More...

#include <google/cloud/bigtable/idempotent_mutation_policy.h>

Public Member Functions

 AlwaysRetryMutationPolicy ()=default
 
std::unique_ptr< IdempotentMutationPolicyclone () const override
 Return a copy of the policy. More...
 
bool is_idempotent (google::bigtable::v2::Mutation const &) override
 Return true if the mutation is idempotent. More...
 
bool is_idempotent (google::bigtable::v2::CheckAndMutateRowRequest const &) override
 Return true if a conditional mutation is idempotent. More...
 

Detailed Description

Implements a policy that retries all mutations.

Notice that this will may result in non-idempotent mutations being resent to the server. Re-trying a SetCell() mutation where the server selects the timestamp can result in multiple copies of the data stored with different timestamps. Only use this policy if your application is prepared to handle such problems, for example, by only querying the last value and setting garbage collection policies to delete the old values.

Definition at line 75 of file idempotent_mutation_policy.h.

Constructor & Destructor Documentation

◆ AlwaysRetryMutationPolicy()

google::cloud::bigtable::AlwaysRetryMutationPolicy::AlwaysRetryMutationPolicy ( )
default

Member Function Documentation

◆ clone()

std::unique_ptr<IdempotentMutationPolicy> google::cloud::bigtable::AlwaysRetryMutationPolicy::clone ( ) const
overridevirtual

Return a copy of the policy.

Implements google::cloud::bigtable::IdempotentMutationPolicy.

◆ is_idempotent() [1/2]

bool google::cloud::bigtable::AlwaysRetryMutationPolicy::is_idempotent ( google::bigtable::v2::CheckAndMutateRowRequest const &  )
overridevirtual

Return true if a conditional mutation is idempotent.

Implements google::cloud::bigtable::IdempotentMutationPolicy.

◆ is_idempotent() [2/2]

bool google::cloud::bigtable::AlwaysRetryMutationPolicy::is_idempotent ( google::bigtable::v2::Mutation const &  )
overridevirtual

Return true if the mutation is idempotent.

Implements google::cloud::bigtable::IdempotentMutationPolicy.