Interface ConnectionDetails

All Known Subinterfaces:
MigrationChain

public sealed interface ConnectionDetails permits MigrationChain (not exhaustive)
Provides detailed information about the connection being used when invoking any method that talks to the database.
Since:
1.4.0
Author:
Michael J. Simons
Soundtrack
Snoop Dogg - Doggystyle
  • Method Details

    • of

      static ConnectionDetails of(String serverAddress, String serverVersion, String serverEdition, String userName, String optionalDatabaseName, String optionalSchemaDatabaseName)
      Creates an instance of ConnectionDetails. Can be useful for testing.
      Parameters:
      serverAddress - the address of the server used
      serverVersion - the Neo4j version the server is running
      serverEdition - the Neo4j edition the server is running
      userName - the Neo4j user that ran the migrations
      optionalDatabaseName - the database if applicable (Neo4j 4.0 and up)
      optionalSchemaDatabaseName - the database if applicable (Neo4j 4.0 and up)
      Returns:
      A new, unmodifiable instance
      Since:
      2.3.0
    • getServerAddress

      String getServerAddress()
      Returns the address of the server used.
      Returns:
      the address of the server used
    • getServerVersion

      String getServerVersion()
      Returns the Neo4j version the server is running.
      Returns:
      the Neo4j version the server is running
    • getServerEdition

      String getServerEdition()
      Returns the Neo4j edition the server is running.
      Returns:
      the Neo4j edition the server is running
      Since:
      1.5.0
    • getUsername

      String getUsername()
      Returns the Neo4j user that ran the migrations.
      Returns:
      the Neo4j user that ran the migrations
    • getOptionalDatabaseName

      Optional<String> getOptionalDatabaseName()
      Returns the database if applicable (Neo4j 4.0 and up).
      Returns:
      the database if applicable (Neo4j 4.0 and up)
    • getOptionalSchemaDatabaseName

      Optional<String> getOptionalSchemaDatabaseName()
      Returns the database if applicable (Neo4j 4.0 and up).
      Returns:
      the database if applicable (Neo4j 4.0 and up)