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 |
withMetrics(com.codahale.metrics.MetricRegistry registry)
Sets a
MetricRegistry that the FaunaClient will use to register and track Connection-level
statistics. |
FaunaClient.Builder |
withQueryTimeout(java.time.Duration timeout)
Sets a global timeout for all the Queries issued by this client.
|
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 withQueryTimeout(java.time.Duration timeout)
timeout
- the query timeout value. The timeout value has milliseconds precision.FaunaClient.Builder
objectpublic FaunaClient build()
FaunaClient
with configuration based on the settings of this FaunaClient.Builder
.FaunaClient