类的使用
com.baidu.mochow.client.ClientConfiguration
使用ClientConfiguration的程序包
-
com.baidu.mochow.client中ClientConfiguration的使用
修饰符和类型字段说明protected ClientConfigurationAbstractMochowClient.configThe client configuration for this client.修饰符和类型方法说明ClientConfiguration.withConnectionTimeoutInMillis(int connectionTimeoutInMillis) Sets the connection timeout in milliseconds, and returns the updated configuration instance.ClientConfiguration.withCredentials(Credentials credentials) Sets the Mochow credentials used by the client to sign HTTP requests, and returns the updated configuration instance.ClientConfiguration.withEndpoint(String endpoint) Sets the service endpoint URL to which the client will connect, and returns the updated configuration instance.ClientConfiguration.withIoThreadCount(int ioThreadCount) Sets the maximum number of io thread, and returns the updated configuration instance.ClientConfiguration.withLocalAddress(InetAddress localAddress) Sets the optional local address to bind when connecting to Mochow services, and returns the updated configuration instance.ClientConfiguration.withMaxConnections(int maxConnections) Sets the maximum number of open HTTP connections, and returns the updated configuration instance.ClientConfiguration.withProtocol(Protocol protocol) Sets the protocol (HTTP/HTTPS) to use when connecting to Mochow services, and returns the updated configuration instance.ClientConfiguration.withRetryPolicy(RetryPolicy retryPolicy) Sets the retry policy for failed requests, and returns the updated configuration instance.ClientConfiguration.withSocketBufferSizeInBytes(int socketBufferSizeInBytes) Sets the optional size (in bytes) for the low level TCP socket buffer, and returns the updated configuration instance.ClientConfiguration.withSocketTimeoutInMillis(int socketTimeoutInMillis) Sets the socket timeout (SO_TIMEOUT) in milliseconds, which is a maximum period inactivity between two consecutive data packets, and returns the updated configuration instance.参数类型为ClientConfiguration的com.baidu.mochow.client中的构造器限定符构造器说明AbstractMochowClient(ClientConfiguration config, HttpResponseHandler[] responseHandlers) Equivalent to AbstractBceClient(config, responseHandlers, false)AbstractMochowClient(ClientConfiguration config, HttpResponseHandler[] responseHandlers, boolean isHttpAsyncPutEnabled) Constructs a new AbstractBceClient with the specified client configuration and handlers.Constructs a new ClientConfiguration instance with the same settings as the specified configuration.ClientConfiguration(ClientConfiguration other, String endpoint) Constructs a new ClientConfiguration instance with the same settings as the specified configuration.MochowClient(ClientConfiguration config) -
com.baidu.mochow.examples中ClientConfiguration的使用
参数类型为ClientConfiguration的com.baidu.mochow.examples中的构造器限定符构造器说明MochowExample(ClientConfiguration clientConfiguration) MochowExample(ClientConfiguration clientConfiguration, IndexType vectorIndexType) -
com.baidu.mochow.http中ClientConfiguration的使用
修饰符和类型字段说明protected ClientConfigurationHttpClient.configClient configuration options, such as proxy settings, max retries, etc.参数类型为ClientConfiguration的com.baidu.mochow.http中的构造器限定符构造器说明HttpClient(ClientConfiguration config, Signer signer) Constructs a new Mochow client using the specified client configuration options (ex: max retry attempts, proxy settings, etc), and request metric collector.HttpClient(ClientConfiguration config, Signer signer, boolean isHttpAsyncPutEnabled) Constructs a new Mochow Http Client with httpAsyncPutEnabled.