Package com.fauna.client
Class FaunaConfig.Builder
- java.lang.Object
-
- com.fauna.client.FaunaConfig.Builder
-
- Enclosing class:
- FaunaConfig
public static class FaunaConfig.Builder extends java.lang.ObjectBuilder class for FaunaConfig. Follows the Builder Design Pattern.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FaunaConfigbuild()Builds and returns a new FaunaConfig instance.FaunaConfig.BuilderclientTimeoutBuffer(java.time.Duration duration)Set the client timeout buffer.FaunaConfig.Builderendpoint(java.lang.String endpoint)Sets the endpoint URL.FaunaConfig.BuilderlogHandler(java.util.logging.Handler handler)Override the default log handler with the given log handler.FaunaConfig.BuildermaxContentionRetries(int maxContentionRetries)Set the Fauna max-contention-retries setting.FaunaConfig.Buildersecret(java.lang.String secret)Sets the secret key.FaunaConfig.BuilderstatsCollector(StatsCollector statsCollector)Set a StatsCollector.
-
-
-
Method Detail
-
endpoint
public FaunaConfig.Builder endpoint(java.lang.String endpoint)
Sets the endpoint URL.- Parameters:
endpoint- A String representing the endpoint URL.- Returns:
- The current Builder instance.
-
secret
public FaunaConfig.Builder secret(java.lang.String secret)
Sets the secret key.- Parameters:
secret- A String representing the secret key.- Returns:
- The current Builder instance.
-
maxContentionRetries
public FaunaConfig.Builder maxContentionRetries(int maxContentionRetries)
Set the Fauna max-contention-retries setting.- Parameters:
maxContentionRetries- A positive integer value.- Returns:
- The current Builder instance.
-
clientTimeoutBuffer
public FaunaConfig.Builder clientTimeoutBuffer(java.time.Duration duration)
Set the client timeout buffer.- Parameters:
duration- The timeout buffer duration.- Returns:
- The current Builder instance.
-
logHandler
public FaunaConfig.Builder logHandler(java.util.logging.Handler handler)
Override the default log handler with the given log handler.- Parameters:
handler- A log handler instance.- Returns:
- The current Builder instance.
-
statsCollector
public FaunaConfig.Builder statsCollector(StatsCollector statsCollector)
Set a StatsCollector.- Parameters:
statsCollector- A stats collector instance.- Returns:
- The current Builder instance.
-
build
public FaunaConfig build()
Builds and returns a new FaunaConfig instance.- Returns:
- A new instance of FaunaConfig.
-
-