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 type | Class |
|---|---|
static class | TSDBConfig.Builder |
Constructor
| Constructor | Description |
|---|---|
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 type | Method | Description | Unit |
|---|---|---|---|
static TSDBConfig.Builder | address(String host, int port) | The TSDB endpoint. Required for all clients. | — |
static TSDBConfig.Builder | address(TSDBNetAddress… netAddresses) | One or more TSDB endpoints as TSDBNetAddress objects. | — |
int | getHttpConnectionPool() | The maximum number of connections in the HTTP connection pool. | — |
int | getHttpConnectTimeout() | The timeout for establishing an HTTP connection. | Seconds |
int | getHttpConnectionLiveTime() | The maximum duration an HTTP connection stays open before the client closes it. | Seconds |
int | getHttpKeepaliveTime() | The keepalive duration for persistent HTTP connections. | Seconds |
boolean | isHttpCompress() | 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 type | Method | Description | Unit |
|---|---|---|---|
boolean | isAsyncPut() | Specifies whether asynchronous writes are enabled. | — |
int | getBatchPutBufferSize() | The buffer capacity for asynchronous writes. | — |
int | getBatchPutSize() | The number of data points submitted per batch. | — |
int | getBatchPutTimeLimit() | The flush timeout for asynchronous writes. | Milliseconds |
int | getBatchPutConsumerThreadCount() | The number of consumer threads draining the buffer and submitting batches to TSDB. | — |
int | getIoThreadCount() | The number of I/O threads used for asynchronous write operations. | — |
int | getBatchPutRetryCount() | 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 type | Method | Description | Unit |
|---|---|---|---|
int | getMaxTPS() | The maximum number of transactions per second (TPS) allowed for write requests. | — |
int | getPutRequestLimit() | The maximum number of concurrent write requests. | — |
boolean | isPutRequestLimitSwitch() | Specifies whether the write request limit is enabled. | — |
boolean | isBackpressure() | 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
Is this page helpful?