public static final class ModifyDBClusterEndpointRequest.Builder extends Object
public ModifyDBClusterEndpointRequest.Builder autoAddNewNodes(String autoAddNewNodes)
* **Enable** * **Disable**
public ModifyDBClusterEndpointRequest.Builder DBClusterId(String DBClusterId)
public ModifyDBClusterEndpointRequest.Builder DBEndpointDescription(String DBEndpointDescription)
public ModifyDBClusterEndpointRequest.Builder DBEndpointId(String DBEndpointId)
public ModifyDBClusterEndpointRequest.Builder endpointConfig(String endpointConfig)
* Specifies the load balancing policy in the format of `{\"LoadBalancePolicy\":\"Selected value\"}`. Default value: 0. Valid values: * **0**: connections-based load balancing * **1**: active requests-based load balancing * Specifies whether to enable the primary node accepts read requests feature in the format of `{\"MasterAcceptReads\":\"Selected value\"}`. Default value: on. Valid values: * **on** * **off** * Specifies whether to enable the transaction splitting feature in the format of `{\"DistributedTransaction\":\"Selected value\"}`. Default value: on. Valid values: * **on** * **off** * Specifies the consistency level in the format of `{\"ConsistLevel\":\"Selected value\"}`. Default value: 1. Valid values: * **0**: eventual consistency (weak) * **1**: session consistency (medium) * **2**: global consistency (strong) * Specifies the connection pool in the format of `{\"ConnectionPersist\":\"Selected value\"}`. Default value: off. Valid values: * **off**: disables the connection pool. * **Session**: enables the session-level connection pool. * **Transaction**: enables the transaction-level connection pool. * Specifies whether to enable the parallel query feature in the format of `{\"MaxParallelDegree\":\"Selected value\"}`. Default value: off. Valid values: * **on** * **off** * Specifies whether to enable the automatic request distribution between row store and column store nodes feature in the format of `{\"EnableHtapImci\":\"Selected value\"}`. Default value: off. Valid values: * **on** * **off** * Specifies whether to enable the overload protection feature in the format of `{\"EnableOverloadThrottle\":\"Selected value\"}`. Default value: off. Valid values: * **on** * **off** > * You can specify the transaction splitting, primary node accepts read requests, connection pool, and overload protection features for a PolarDB for MySQL cluster only if ReadWriteMode is set to ReadWrite for the cluster endpoint. * If the read /write mode of a PolarDB for MySQL cluster is set to **Read-only**, the **Connection-based SLB** and **Active Request-based SLB** SLB policies are supported. The **Read-write (Automatic read /write splitting) **mode of the cluster supports** Active Request-based SLB** policy. * If ReadWriteMode is set to **ReadWrite** for the cluster endpoint of a PolarDB for MySQL cluster or if ReadWriteMode is set to **ReadOnly** and the load balancing policy is set to **active requests-based load balancing**, the automatic request distribution between row store and column store nodes feature is supported. * Only PolarDB for MySQL supports global consistency. * If the **ReadWriteMode** parameter is set to **ReadOnly**, the consistency level must be **0**. * You can specify the consistency level, transaction splitting, connection pool, and primary node accepts read requests features at a time, such as `{\"ConsistLevel\":\"1\",\"DistributedTransaction\":\"on\",\"ConnectionPersist\":\"Session\",\"MasterAcceptReads\":\"on\"}`. * The transaction splitting settings are restricted by the consistency level settings. For example, if you set the consistency level to **0**, transaction splitting cannot be enabled. If you set the consistency level to **1** or **2**, transaction splitting can be enabled.
public ModifyDBClusterEndpointRequest.Builder nodes(String nodes)
> * You must specify the node ID for each PolarDB for MySQL cluster. * You must specify the role name of each node for each PolarDB for PostgreSQL or PolarDB for Oracle cluster. Example: `Writer,Reader1,Reader2`. * If you set **ReadWriteMode** to **ReadOnly**, only one node can be associated with the cluster endpoint. If the only node becomes faulty, the cluster endpoint may be unavailable for up to an hour. We recommend that you do not associate only one node with the cluster endpoint in production environments. We recommend that you associate at least two nodes with the cluster endpoint to improve service availability. * If you set **ReadWriteMode** to **ReadWrite**, you must associate at least two nodes with the cluster endpoint. * No limits are imposed on the two nodes that you select for each PolarDB for MySQL cluster. If the two nodes are read-only nodes, write requests are forwarded to the primary node. * The following limit applies to PolarDB for PostgreSQL and PolarDB for Oracle clusters: One of the selected nodes must be the primary node.
public ModifyDBClusterEndpointRequest.Builder ownerAccount(String ownerAccount)
public ModifyDBClusterEndpointRequest.Builder ownerId(Long ownerId)
public ModifyDBClusterEndpointRequest.Builder readWriteMode(String readWriteMode)
* **ReadWrite**: The cluster endpoint handles read and write requests. Automatic read/write splitting is enabled. * **ReadOnly**: The cluster endpoint handles read-only requests.
public ModifyDBClusterEndpointRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public ModifyDBClusterEndpointRequest.Builder resourceOwnerId(Long resourceOwnerId)
public ModifyDBClusterEndpointRequest build()
Copyright © 2024. All rights reserved.