Interface ClickHouseClient

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    AbstractClient

    public interface ClickHouseClient
    extends AutoCloseable
    A unified interface defines Java client for ClickHouse. A client can only connect to one ClickHouseNode at a time. When switching from one node to another, connection made to previous node will be closed automatically before new connection being established.

    To decouple from concrete implementation tied to specific protocol, it is recommended to use builder() for instantiation. In order to register a new type of client, please add META-INF/services/com.clickhouse.client.ClickHouseClient into your artifact, so that java.util.SerivceLoader can discover the implementation properly in runtime.