Class ClusterApiClient
java.lang.Object
com.couchbase.client.java.cluster.api.AbstractClusterApiClient<RestBuilder>
com.couchbase.client.java.cluster.api.ClusterApiClient
@Public @Experimental public class ClusterApiClient extends AbstractClusterApiClient<RestBuilder>
An utility class to execute generic HTTP calls synchronously on a cluster's REST API.
- Since:
- 2.3.2
- Author:
- Simon Baslé
-
Field Summary
Fields inherited from class com.couchbase.client.java.cluster.api.AbstractClusterApiClient
core, password, username
-
Constructor Summary
Constructors Constructor Description ClusterApiClient(String username, String password, ClusterFacade core, long defaultTimeout, TimeUnit defaultTimeUnit)
Build a newClusterApiClient
to work with a givenClusterFacade
. -
Method Summary
Modifier and Type Method Description protected RestBuilder
createBuilder(com.couchbase.client.deps.io.netty.handler.codec.http.HttpMethod method, String fullPath)
Create the concretebuilders
returned by concrete implementations.long
defaultTimeout()
TimeUnit
defaultTimeUnit()
-
Constructor Details
-
ClusterApiClient
public ClusterApiClient(String username, String password, ClusterFacade core, long defaultTimeout, TimeUnit defaultTimeUnit)Build a newClusterApiClient
to work with a givenClusterFacade
.- Parameters:
username
- the login to use for REST api calls (eg. administrative username).password
- the password associated with the username.core
- theClusterFacade
through which to send requests.defaultTimeout
- the default timeout duration to use when executing requests.defaultTimeUnit
- the time unit for the timeout.
-
-
Method Details
-
createBuilder
protected RestBuilder createBuilder(com.couchbase.client.deps.io.netty.handler.codec.http.HttpMethod method, String fullPath)Description copied from class:AbstractClusterApiClient
Create the concretebuilders
returned by concrete implementations. Builders will be either capable of synchronous or asynchronous execution, depending on type T.- Specified by:
createBuilder
in classAbstractClusterApiClient<RestBuilder>
-
defaultTimeout
public long defaultTimeout()- Returns:
- the default timeout duration used when executing requests that don't specify a timeout.
-
defaultTimeUnit
- Returns:
- the default time unit used when executing requests that don't specify a timeout.
-