Package com.fauna.client
Class FaunaConfig
- java.lang.Object
-
- com.fauna.client.FaunaConfig
-
public final class FaunaConfig extends java.lang.ObjectFaunaConfig is a configuration class used to set up and configure a connection to Fauna. It encapsulates various settings such as the endpoint URL, secret key, and more.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFaunaConfig.BuilderBuilder class for FaunaConfig.static classFaunaConfig.FaunaEndpointstatic classFaunaConfig.FaunaEnvironmentThis class handles reading Fauna environment variables for the client.
-
Field Summary
Fields Modifier and Type Field Description static FaunaConfigDEFAULTstatic FaunaConfigLOCAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FaunaConfig.Builderbuilder()Creates a new builder for FaunaConfig.java.time.DurationgetClientTimeoutBuffer()Gets the buffer that will be added to the HTTP client timeout, in addition to any query timeout.java.lang.StringgetEndpoint()Gets the Fauna endpoint URL.java.util.logging.HandlergetLogHandler()Gets the log handler that the client will use.intgetMaxContentionRetries()Gets the number of contention retries that the Fauna server will attempt.java.lang.StringgetSecret()Gets the secret key used for authentication.StatsCollectorgetStatsCollector()Gets the stats collector for the client.
-
-
-
Field Detail
-
DEFAULT
public static final FaunaConfig DEFAULT
-
LOCAL
public static final FaunaConfig LOCAL
-
-
Method Detail
-
getEndpoint
public java.lang.String getEndpoint()
Gets the Fauna endpoint URL.- Returns:
- A String representing the endpoint URL. The default is https://db.fauna.com
-
getSecret
public java.lang.String getSecret()
Gets the secret key used for authentication.- Returns:
- A String representing the secret key.
-
getMaxContentionRetries
public int getMaxContentionRetries()
Gets the number of contention retries that the Fauna server will attempt.- Returns:
- An integer value.
-
getClientTimeoutBuffer
public java.time.Duration getClientTimeoutBuffer()
Gets the buffer that will be added to the HTTP client timeout, in addition to any query timeout.- Returns:
- The timeout buffer Duration.
-
getLogHandler
public java.util.logging.Handler getLogHandler()
Gets the log handler that the client will use.- Returns:
- A log handler instance.
-
getStatsCollector
public StatsCollector getStatsCollector()
Gets the stats collector for the client.- Returns:
- A StatsCollector instance.
-
builder
public static FaunaConfig.Builder builder()
Creates a new builder for FaunaConfig.- Returns:
- A new instance of Builder.
-
-