TSDBConfig

Updated at:
Copy as MD

TSDBConfig is the configuration class for the TSDB Java SDK client. Use the nested TSDBConfig.Builder to construct a client configuration, then pass it to the TSDB client on initialization.

Class name: com.aliyun.hitsdb.client.TSDBConfig

Hierarchy: java.lang.Object → com.aliyun.hitsdb.client.TSDBConfig

Declaration: public class TSDBConfig extends Object

Nested class

Qualifier and typeClass
static classTSDBConfig.Builder

Constructor

ConstructorDescription
public TSDBConfig()Creates a TSDBConfig instance. Use TSDBConfig.Builder methods to configure the client instead of calling this constructor directly.

Methods

Methods are grouped by configuration category.

Connection settings

These methods control how the client connects to TSDB over HTTP.

Return typeMethodDescriptionUnit
static TSDBConfig.Builderaddress(String host, int port)The TSDB endpoint. Required for all clients.—
static TSDBConfig.Builderaddress(TSDBNetAddress… netAddresses)One or more TSDB endpoints as TSDBNetAddress objects.—
intgetHttpConnectionPool()The maximum number of connections in the HTTP connection pool.—
intgetHttpConnectTimeout()The timeout for establishing an HTTP connection.Seconds
intgetHttpConnectionLiveTime()The maximum duration an HTTP connection stays open before the client closes it.Seconds
intgetHttpKeepaliveTime()The keepalive duration for persistent HTTP connections.Seconds
booleanisHttpCompress()Specifies whether HTTP request payloads are compressed before transmission.—

Asynchronous write settings

These methods configure the client's asynchronous write pipeline, which buffers data points and submits them in batches.

Return typeMethodDescriptionUnit
booleanisAsyncPut()Specifies whether asynchronous writes are enabled.—
intgetBatchPutBufferSize()The buffer capacity for asynchronous writes.—
intgetBatchPutSize()The number of data points submitted per batch.—
intgetBatchPutTimeLimit()The flush timeout for asynchronous writes.Milliseconds
intgetBatchPutConsumerThreadCount()The number of consumer threads draining the buffer and submitting batches to TSDB.—
intgetIoThreadCount()The number of I/O threads used for asynchronous write operations.—
intgetBatchPutRetryCount()The number of retry attempts for failed batch write requests.—
AbstractBatchPutCallback<?>getBatchPutCallback()The AbstractBatchPutCallback object registered for batch write callbacks.—

Rate limiting and backpressure

Return typeMethodDescriptionUnit
intgetMaxTPS()The maximum number of transactions per second (TPS) allowed for write requests.—
intgetPutRequestLimit()The maximum number of concurrent write requests.—
booleanisPutRequestLimitSwitch()Specifies whether the write request limit is enabled.—
booleanisBackpressure()Specifies whether backpressure is enabled.—

Inherited methods

The following methods are inherited from java.lang.Object:

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait