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

Specify the initial configuration for an application profile. More...

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

Public Member Functions

 AppProfileConfig (google::bigtable::admin::v2::CreateAppProfileRequest proto)
 
AppProfileConfigset_ignore_warnings (bool value)
 
AppProfileConfigset_description (std::string description)
 
AppProfileConfigset_etag (std::string etag)
 
google::bigtable::admin::v2::CreateAppProfileRequest const & as_proto () const &
 
google::bigtable::admin::v2::CreateAppProfileRequest && as_proto () &&
 

Static Public Member Functions

static AppProfileConfig MultiClusterUseAny (std::string profile_id, std::vector< std::string > cluster_ids={})
 Create an AppProfile that uses multi-cluster routing. More...
 
static AppProfileConfig SingleClusterRouting (std::string profile_id, std::string cluster_id, bool allow_transactional_writes=false)
 Create an AppProfile that uses single cluster routing. More...
 

Detailed Description

Specify the initial configuration for an application profile.

Definition at line 27 of file app_profile_config.h.

Constructor & Destructor Documentation

◆ AppProfileConfig()

google::cloud::bigtable::AppProfileConfig::AppProfileConfig ( google::bigtable::admin::v2::CreateAppProfileRequest  proto)
inlineexplicit

Definition at line 29 of file app_profile_config.h.

Member Function Documentation

◆ as_proto() [1/2]

google::bigtable::admin::v2::CreateAppProfileRequest&& google::cloud::bigtable::AppProfileConfig::as_proto ( ) &&
inline

Definition at line 88 of file app_profile_config.h.

◆ as_proto() [2/2]

google::bigtable::admin::v2::CreateAppProfileRequest const& google::cloud::bigtable::AppProfileConfig::as_proto ( ) const &
inline

Definition at line 83 of file app_profile_config.h.

◆ MultiClusterUseAny()

static AppProfileConfig google::cloud::bigtable::AppProfileConfig::MultiClusterUseAny ( std::string  profile_id,
std::vector< std::string >  cluster_ids = {} 
)
static

Create an AppProfile that uses multi-cluster routing.

Read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes consistency to improve availability.

Parameters
profile_idThe unique name of the AppProfile.
cluster_idsThe set of clusters to route to. The order is ignored; clusters will be tried in order of distance. If left empty, all clusters are eligible.

◆ set_description()

AppProfileConfig& google::cloud::bigtable::AppProfileConfig::set_description ( std::string  description)
inline

Definition at line 73 of file app_profile_config.h.

◆ set_etag()

AppProfileConfig& google::cloud::bigtable::AppProfileConfig::set_etag ( std::string  etag)
inline

Definition at line 78 of file app_profile_config.h.

◆ set_ignore_warnings()

AppProfileConfig& google::cloud::bigtable::AppProfileConfig::set_ignore_warnings ( bool  value)
inline

Definition at line 68 of file app_profile_config.h.

◆ SingleClusterRouting()

static AppProfileConfig google::cloud::bigtable::AppProfileConfig::SingleClusterRouting ( std::string  profile_id,
std::string  cluster_id,
bool  allow_transactional_writes = false 
)
static

Create an AppProfile that uses single cluster routing.

Unconditionally routes all read/write requests to a specific cluster. This option preserves read-your-writes consistency but does not improve availability.

Parameters
profile_idThe unique name of the AppProfile.
cluster_idThe cluster to which read/write requests are routed.
allow_transactional_writesWhether or not CheckAndMutateRow and ReadModifyWriteRow requests are allowed by this app profile. It is unsafe to send these requests to the same table/row/column in multiple clusters.