Class NeptuneConfig


public class NeptuneConfig extends AbstractServiceConfig<NeptuneConfig.Builder>
Configuration for Neptune-specific container settings.

Instances are created via NeptuneConfig.Builder:


 NeptuneConfig config = NeptuneConfig.builder()
     .enabled(true)
     .proxyPortRange(8182, 10)
     .defaultImage("tinkerpop/gremlin-server:3.7.3")
     .build();
 
  • Method Details

    • builder

      public static NeptuneConfig.Builder builder()
      Returns a new NeptuneConfig.Builder for this configuration.
      Returns:
      a new builder
    • toBuilder

      public NeptuneConfig.Builder toBuilder()
      Returns a new NeptuneConfig.Builder for this configuration, initialized with the current values of this instance.
      Specified by:
      toBuilder in class AbstractServiceConfig<NeptuneConfig.Builder>
      Returns:
      a new builder pre-populated with this configuration's values
    • getProxyBasePort

      public int getProxyBasePort()
      Returns the base port for the Neptune proxy port range.
      Returns:
      the base port
    • getProxyPortsCount

      public int getProxyPortsCount()
      Returns the number of ports allocated for the Neptune proxy, starting from getProxyBasePort().
      Returns:
      the number of proxy ports
    • getProxyMaxPort

      public int getProxyMaxPort()
      Returns the inclusive upper bound of the Neptune proxy port range.
      Returns:
      the maximum port
    • getDbType

      public String getDbType()
      Returns the backend graph engine and query language used for Neptune: gremlin (Apache TinkerPop, Gremlin over WebSocket) or neo4j (Neo4j, openCypher over Bolt). Mirrors LocalStack's NEPTUNE_DB_TYPE.
      Returns:
      the database type
    • getDefaultImage

      public String getDefaultImage()
      Returns the default Docker image used when getDbType() is gremlin.
      Returns:
      the image name
    • getDefaultNeo4jImage

      public String getDefaultNeo4jImage()
      Returns the default Docker image used when getDbType() is neo4j (openCypher / Bolt).
      Returns:
      the image name
    • getDockerNetwork

      public String getDockerNetwork()
      Returns the Docker network used for Neptune containers, or null if not set.
      Returns:
      the Docker network name, or null
    • applyEnvVarsToContainer

      public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by setting the appropriate environment variables.
      Overrides:
      applyEnvVarsToContainer in class AbstractServiceConfig<NeptuneConfig.Builder>
      Parameters:
      container - the container to configure
    • applyExposedPortsToContainer

      public void applyExposedPortsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by exposing the appropriate ports.
      Overrides:
      applyExposedPortsToContainer in class AbstractServiceConfig<NeptuneConfig.Builder>
      Parameters:
      container - the container to configure