Class ClickHouseConfig

    • Constructor Detail

      • ClickHouseConfig

        public ClickHouseConfig​(ClickHouseConfig... configs)
        Construct a new configuration by consolidating given ones.
        Parameters:
        configs - list of configuration
      • ClickHouseConfig

        public ClickHouseConfig​(List<ClickHouseConfig> configs)
        Construct a new configuration by consolidating given ones.
        Parameters:
        configs - list of configuration
    • Method Detail

      • toClientOptions

        public static Map<ClickHouseOption,​Serializable> toClientOptions​(Map<?,​?> props)
        Converts given key-value pairs to a mutable map of corresponding ClickHouseOption.
        Parameters:
        props - key-value pairs
        Returns:
        non-null mutable map of client options
      • isAsync

        public boolean isAsync()
      • isAutoDiscovery

        public boolean isAutoDiscovery()
      • getClientName

        public String getClientName()
      • isResponseCompressed

        public boolean isResponseCompressed()
        Checks if server response is compressed or not.
        Returns:
        true if server response is compressed; false otherwise
      • getResponseCompressLevel

        public int getResponseCompressLevel()
        Gets input compress level. When isResponseCompressed() is false, this will return 0.
        Returns:
        compress level
      • isCompressServerResponse

        @Deprecated
        public boolean isCompressServerResponse()
        Deprecated.
        will be removed in v0.3.3, please use isResponseCompressed() instead
        Checks if server response should be compressed or not.
        Returns:
        true if server response is compressed; false otherwise
      • getCompressLevelForServerResponse

        @Deprecated
        public int getCompressLevelForServerResponse()
        Deprecated.
        will be removed in v0.3.3, please use getResponseCompressLevel() instead
        Gets compress level for server response.
        Returns:
        compress level
      • isRequestCompressed

        public boolean isRequestCompressed()
        Checks if client's output, aka. client request, should be compressed or not.
        Returns:
        true if client request should be compressed; false otherwise
      • getRequestCompressLevel

        public int getRequestCompressLevel()
        Gets input compress level. When isRequestCompressed() is false, this will return 0.
        Returns:
        compress level
      • isDecompressClientRequet

        @Deprecated
        public boolean isDecompressClientRequet()
        Deprecated.
        will be removed in v0.3.3, please use isRequestCompressed() instead
        Checks if client request should be compressed or not.
        Returns:
        true if server needs to decompress client request; false otherwise
      • getDecompressLevelForClientRequest

        @Deprecated
        public int getDecompressLevelForClientRequest()
        Deprecated.
        will be removed in v0.3.3, please use getRequestCompressLevel() instead
        Gets compress level for client request.
        Returns:
        compress level
      • getConnectionTimeout

        public int getConnectionTimeout()
      • getDatabase

        public String getDatabase()
      • getNodeCheckInterval

        public int getNodeCheckInterval()
      • getMaxBufferSize

        public int getMaxBufferSize()
        Gets max buffer size in byte can be used for streaming.
        Returns:
        max buffer size in byte
      • getBufferSize

        public int getBufferSize()
        Gets default buffer size in byte for both read and write.
        Returns:
        default buffer size in byte
      • getBufferQueueVariation

        public int getBufferQueueVariation()
        Gets number of times the buffer queue is filled up before increasing capacity of buffer queue. Zero or negative value means the queue length is fixed.
        Returns:
        variation
      • getReadBufferSize

        public int getReadBufferSize()
        Gets read buffer size in byte.
        Returns:
        read buffer size in byte
      • getWriteBufferSize

        public int getWriteBufferSize()
        Gets write buffer size in byte.
        Returns:
        write buffer size in byte
      • getRequestChunkSize

        public int getRequestChunkSize()
        Gets request chunk size.
        Returns:
        request chunk size
      • getRequestBuffering

        public ClickHouseBufferingMode getRequestBuffering()
        Gets request buffering mode.
        Returns:
        request buffering mode
      • getResponseBuffering

        public ClickHouseBufferingMode getResponseBuffering()
        Gets response buffering mode.
        Returns:
        response buffering mode
      • getMaxExecutionTime

        public int getMaxExecutionTime()
      • getMaxQueuedBuffers

        public int getMaxQueuedBuffers()
      • getMaxQueuedRequests

        public int getMaxQueuedRequests()
      • getMaxResultRows

        public long getMaxResultRows()
      • getMaxThreadsPerClient

        public int getMaxThreadsPerClient()
      • getFailover

        public int getFailover()
      • getRetry

        public int getRetry()
      • isRepeatOnSessionLock

        public boolean isRepeatOnSessionLock()
      • isRetry

        @Deprecated
        public boolean isRetry()
        Deprecated.
        will be removed in v0.3.3, please use getRetry() instead
        Checks whether retry is enabled or not.
        Returns:
        true if retry is enabled; false otherwise
      • isReuseValueWrapper

        public boolean isReuseValueWrapper()
      • hasServerInfo

        public boolean hasServerInfo()
        Checks whether we got all server information(e.g. timezone and version).
        Returns:
        true if we got all server information; false otherwise
      • getServerTimeZone

        public TimeZone getServerTimeZone()
      • getSessionTimeout

        public int getSessionTimeout()
      • isSessionCheck

        public boolean isSessionCheck()
      • getSocketTimeout

        public int getSocketTimeout()
      • isSsl

        public boolean isSsl()
      • getSslRootCert

        public String getSslRootCert()
      • getSslCert

        public String getSslCert()
      • getSslKey

        public String getSslKey()
      • getTransactionTimeout

        public int getTransactionTimeout()
      • isUseBlockingQueue

        public boolean isUseBlockingQueue()
      • isUseObjectsInArray

        public boolean isUseObjectsInArray()
      • isUseNoProxy

        public boolean isUseNoProxy()
      • isUseServerTimeZone

        public boolean isUseServerTimeZone()
      • isUseServerTimeZoneForDates

        public boolean isUseServerTimeZoneForDates()
      • getTimeZoneForDate

        public TimeZone getTimeZoneForDate()
        Gets time zone for date values.
        Returns:
        time zone, could be null when use_server_time_zone_for_date is set to false.
      • getPreferredTags

        public Set<String> getPreferredTags()
      • hasOption

        public boolean hasOption​(ClickHouseOption option)
        Test whether a given option is configured or not.
        Parameters:
        option - option to test
        Returns:
        true if the option is configured; false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object