public static final class FaunaClient.Builder extends Object
FaunaClient| Modifier and Type | Method and Description |
|---|---|
FaunaClient |
build()
Returns a newly constructed
FaunaClient with configuration based on the settings of this FaunaClient.Builder. |
FaunaClient.Builder |
withEndpoint(String endpoint)
Sets the FaunaDB endpoint url for the built
FaunaClient. |
FaunaClient.Builder |
withHttpClient(AsyncHttpClient httpClient)
Sets a custom
AsyncHttpClient implementation that the built FaunaClient will use. |
FaunaClient.Builder |
withMetrics(MetricRegistry registry)
Sets a
MetricRegistry that the FaunaClient will use to register and track Connection-level
statistics. |
FaunaClient.Builder |
withSecret(String secret)
Sets the secret to be passed to FaunaDB as a authentication token
|
public FaunaClient.Builder withSecret(String secret)
secret - the auth token secretFaunaClient.Builder objectpublic FaunaClient.Builder withEndpoint(String endpoint) throws MalformedURLException
FaunaClient.endpoint - the root endpoint URLFaunaClient.Builder objectMalformedURLExceptionpublic FaunaClient.Builder withMetrics(MetricRegistry registry)
MetricRegistry that the FaunaClient will use to register and track Connection-level
statistics.registry - the MetricRegistry instance.FaunaClient.Builder objectpublic FaunaClient.Builder withHttpClient(AsyncHttpClient httpClient)
AsyncHttpClient implementation that the built FaunaClient will use.
This custom implementation can be provided to control the behavior of the underlying HTTP transport.httpClient - the custom AsyncHttpClient instanceFaunaClient.Builder objectpublic FaunaClient build()
FaunaClient with configuration based on the settings of this FaunaClient.Builder.