public static final class FaunaClient.Builder
extends java.lang.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(java.lang.String endpoint)
Sets the FaunaDB endpoint url for the
FaunaClient instance. |
FaunaClient.Builder |
withHttpClient(org.asynchttpclient.AsyncHttpClient httpClient)
Sets a custom
AsyncHttpClient for the FaunaClient instance. |
FaunaClient.Builder |
withMetrics(com.codahale.metrics.MetricRegistry registry)
Sets a
MetricRegistry that the FaunaClient will use to register and track Connection-level
statistics. |
FaunaClient.Builder |
withSecret(java.lang.String secret)
Sets the secret to be passed to FaunaDB as a authentication token
|
public FaunaClient.Builder withSecret(java.lang.String secret)
secret - the auth token secretFaunaClient.Builder objectpublic FaunaClient.Builder withEndpoint(java.lang.String endpoint) throws java.net.MalformedURLException
FaunaClient instance.endpoint - the root endpoint URLFaunaClient.Builder objectjava.net.MalformedURLException - if the endpoint is invalidpublic FaunaClient.Builder withMetrics(com.codahale.metrics.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(org.asynchttpclient.AsyncHttpClient httpClient)
AsyncHttpClient for the FaunaClient instance.
A 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.FaunaClient