Package io.micronaut.neo4j.bolt
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version.Use testcontainers instead. -
Field Summary
Modifier and TypeFieldDescriptionprotected org.neo4j.driver.Config.ConfigBuilder
static final int
The default retry count value.static final int
The default retry delay value.Fields inherited from interface io.micronaut.neo4j.bolt.Neo4jBoltSettings
DEFAULT_LOCATION, DEFAULT_URI, PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptional<org.neo4j.driver.AuthToken>
org.neo4j.driver.Config
org.neo4j.driver.Config.ConfigBuilder
Deprecated, for removal: This API element is subject to removal in a future version.Use testcontainers instead.int
@NonNull URI
getUri()
void
setAuthToken
(@Nullable org.neo4j.driver.AuthToken authToken) void
setEmbeddedSettings
(Neo4jBoltConfiguration.Neo4jEmbeddedSettings embeddedSettings) Deprecated, for removal: This API element is subject to removal in a future version.Use testcontainers instead.void
setPassword
(String password) void
setRetryCount
(int retryCount) Default value (3).void
setRetryDelay
(Duration retryDelay) Default value (1).void
setTrustStrategy
(org.neo4j.driver.Config.TrustStrategy trustStrategy) void
Set a singleURI
.void
setUsername
(String username)
-
Field Details
-
DEFAULT_RETRYCOUNT
public static final int DEFAULT_RETRYCOUNTThe default retry count value.- See Also:
-
DEFAULT_RETRYDELAY_SECONDS
public static final int DEFAULT_RETRYDELAY_SECONDSThe 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
- Returns:
- The Neo4j URIs
-
setUri
Set a singleURI
.- 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
- Returns:
- The delay between retry attempts
-
setRetryDelay
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
- Returns:
- The auth token to use
- See Also:
-
AuthTokens
-
setAuthToken
@Inject public void setAuthToken(@Nullable @Nullable org.neo4j.driver.AuthToken authToken) - Parameters:
authToken
- TheAuthToken
-
setUsername
- Parameters:
username
- The username
-
setPassword
- Parameters:
password
- The password
-
setTrustStrategy
@Inject public void setTrustStrategy(@Nullable org.neo4j.driver.Config.TrustStrategy trustStrategy) - Parameters:
trustStrategy
- TheConfig.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
- TheNeo4jBoltConfiguration.Neo4jEmbeddedSettings
-