edit-icon download-icon

Create client

Last Updated: Jul 06, 2018

Suggestion: Before you continue with HiTSDB SDK, we recommend you read Terms and HTTP API Reference first to learn the basics of HiTSDB and the usage of API.

You must create your HiTSDB client before using the SDK. An HiTSDB object is an available, thread-safe client object. This article describes using the HiTSDB class to create an HiTSDB object or client.

An HiTSDB class is an operation class of the HiTSDB client. Objects of the HiTSDB class are the basis for reading, putting, or operating HiTSDB in other ways.

The following classes are required before creating HiTSDB class objects:

  • HiTSDBConfig class: fundamental class of the HiTSDB client.
  • HiTSDBClientFactory class: the factory class of HiTSDB class.

An HiTSDB can be generated after a configured HiTSDBConfig class introduces the Connect method of the HiTSDBClientFactory class.

Note: before creating an HiTSDB object, create an HiTSDBConfig object.

Sample code

  1. // Configure HiTSDBConfig parameters and create HiTSDBConfig instances.
  2. // Example.hitsdb.com is a domain or address. 8242 is a network port of HiTSBD. You can check your actual domain, address, and network port on the console.
  3. HiTSDBConfig config = HiTSDBConfig.address("example.hitsdb.com",8242).config();
  4. // An HiTSDB object is generated by using HiTSDBClientFactory.
  5. HiTSDB tsdb = HiTSDBClientFactory.connect(config);


Suggestion: Before using HiTSDB SDK, we that you review Terms and [HTTP API Reference] for basic concepts of HiTSDB and how to use the API.

Thank you! We've received your feedback.