Class Fauna


  • public class Fauna
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Fauna()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FaunaClient client()
      Create a default Fauna client.
      static FaunaClient client​(FaunaConfig config)
      Create a Fauna client with the given FaunaConfig (and default HTTP client, and RetryStrategy).
      static FaunaClient client​(FaunaConfig config, java.net.http.HttpClient httpClient, RetryStrategy retryStrategy)
      Create a Fauna client with the given FaunaConfig, HTTP client, and RetryStrategy.
      static FaunaClient local()
      Create a Fauna client for local development using the Fauna Docker container.
      static FaunaClient scoped​(FaunaClient client, java.lang.String database)
      Create a new Fauna client that wraps an existing client, but is scoped to a specific database.
      static FaunaClient scoped​(FaunaClient client, java.lang.String database, FaunaRole role)
      Create a new Fauna client that wraps an existing client, but is scoped to a specific database.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Fauna

        public Fauna()
    • Method Detail

      • client

        public static FaunaClient client()
        Create a default Fauna client.
        Returns:
        A FaunaClient (or subclass of it).
      • client

        public static FaunaClient client​(FaunaConfig config)
        Create a Fauna client with the given FaunaConfig (and default HTTP client, and RetryStrategy).
        Parameters:
        config - Fauna configuration object.
        Returns:
        A FaunaClient (or subclass of it).
      • client

        public static FaunaClient client​(FaunaConfig config,
                                         java.net.http.HttpClient httpClient,
                                         RetryStrategy retryStrategy)
        Create a Fauna client with the given FaunaConfig, HTTP client, and RetryStrategy.
        Parameters:
        config - Fauna configuration object.
        httpClient - A HTTP client (from java.net.http in Java 11+).
        retryStrategy - An implementation of RetryStrategy.
        Returns:
        A FaunaClient (or subclass of it).
      • scoped

        public static FaunaClient scoped​(FaunaClient client,
                                         java.lang.String database)
        Create a new Fauna client that wraps an existing client, but is scoped to a specific database.
        Parameters:
        client - Another Fauna client.
        database - The name of the database.
        Returns:
        A FaunaClient (or subclass of it).
      • scoped

        public static FaunaClient scoped​(FaunaClient client,
                                         java.lang.String database,
                                         FaunaRole role)
        Create a new Fauna client that wraps an existing client, but is scoped to a specific database.
        Parameters:
        client - Another Fauna client.
        database - The name of the database.
        role - A Fauna role (either built-in or user defined).
        Returns:
        A FaunaClient (or subclass of it).
      • local

        public static FaunaClient local()
        Create a Fauna client for local development using the Fauna Docker container.
        Returns:
        A FaunaClient (or subclass of it).