Class Neo4jBoltConfiguration

java.lang.Object
io.micronaut.neo4j.bolt.Neo4jBoltConfiguration
All Implemented Interfaces:
Neo4jBoltSettings

@ConfigurationProperties("neo4j") public class Neo4jBoltConfiguration extends Object implements Neo4jBoltSettings
Configuration for Bolt Neo4j driver.
Since:
1.0
Author:
graemerocher
  • Field Details

    • DEFAULT_RETRYCOUNT

      public static final int DEFAULT_RETRYCOUNT
      The default retry count value.
      See Also:
    • DEFAULT_RETRYDELAY_SECONDS

      public static final int DEFAULT_RETRYDELAY_SECONDS
      The default retry delay value.
      See Also:
    • config

      @ConfigurationBuilder(prefixes="with", allowZeroArgs=true) protected org.neo4j.driver.Config.ConfigBuilder config
  • Constructor Details

    • Neo4jBoltConfiguration

      public Neo4jBoltConfiguration()
      Constructor.
  • Method Details

    • getUri

      @NonNull public @NonNull URI getUri()
      Returns:
      The Neo4j URIs
    • setUri

      public void setUri(@NonNull @NotNull @NonNull @NotNull URI uri)
      Set a single URI.
      Parameters:
      uri - A single Neo4j URI
    • getRetryCount

      public int getRetryCount()
      Returns:
      The number of times to retry establishing a connection to the server
    • setRetryCount

      public void setRetryCount(int retryCount)
      Default value (3).
      Parameters:
      retryCount - The retry count
    • getRetryDelay

      public Duration getRetryDelay()
      Returns:
      The delay between retry attempts
    • setRetryDelay

      public void setRetryDelay(Duration retryDelay)
      Default value (1).
      Parameters:
      retryDelay - The delay between retry attempts
    • getConfig

      public org.neo4j.driver.Config getConfig()
      Returns:
      The configuration
    • getConfigBuilder

      public org.neo4j.driver.Config.ConfigBuilder getConfigBuilder()
      Returns:
      The configuration builder used
    • getAuthToken

      public Optional<org.neo4j.driver.AuthToken> getAuthToken()
      Returns:
      The auth token to use
      See Also:
      • AuthTokens
    • setAuthToken

      @Inject public void setAuthToken(@Nullable @Nullable org.neo4j.driver.AuthToken authToken)
      Parameters:
      authToken - The AuthToken
    • setUsername

      public void setUsername(String username)
      Parameters:
      username - The username
    • setPassword

      public void setPassword(String password)
      Parameters:
      password - The password
    • setTrustStrategy

      @Inject public void setTrustStrategy(@Nullable org.neo4j.driver.Config.TrustStrategy trustStrategy)
      Parameters:
      trustStrategy - The Config.TrustStrategy
    • getEmbeddedSettings

      @Deprecated(since="6.0.2", forRemoval=true) public Neo4jBoltConfiguration.Neo4jEmbeddedSettings getEmbeddedSettings()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use testcontainers instead. See Testcontainers Neo4j
      Returns:
      The settings for the embedded Neo4j server
    • setEmbeddedSettings

      @Deprecated(since="6.0.2", forRemoval=true) @Inject public void setEmbeddedSettings(Neo4jBoltConfiguration.Neo4jEmbeddedSettings embeddedSettings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use testcontainers instead. See Testcontainers Neo4j
      Parameters:
      embeddedSettings - The Neo4jBoltConfiguration.Neo4jEmbeddedSettings