Class FaunaConfig.Builder

  • Enclosing class:
    FaunaConfig

    public static class FaunaConfig.Builder
    extends java.lang.Object
    Builder class for FaunaConfig. Follows the Builder Design Pattern.
    • Constructor Detail

      • Builder

        public Builder()
    • 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.