Class SessionConfig

java.lang.Object
org.neo4j.driver.SessionConfig
All Implemented Interfaces:
Serializable

public final class SessionConfig extends Object implements Serializable
The session configurations used to configure a session.
See Also:
  • Method Details

    • builder

      public static SessionConfig.Builder builder()
      Creates a new SessionConfig.Builder used to construct a configuration object.
      Returns:
      a session configuration builder.
    • defaultConfig

      public static SessionConfig defaultConfig()
      Returns a static SessionConfig with default values for a general purpose session.
      Returns:
      a session config for a general purpose session.
    • forDatabase

      public static SessionConfig forDatabase(String database)
      Returns a SessionConfig for the specified database
      Parameters:
      database - the database the session binds to.
      Returns:
      a session config for a session for the specified database.
    • bookmarks

      public Iterable<Bookmark> bookmarks()
      Returns the initial bookmarks. First transaction in the session created with this SessionConfig will ensure that server hosting is at least as up-to-date as the latest transaction referenced by the supplied initial bookmarks.
      Returns:
      the initial bookmarks.
    • defaultAccessMode

      public AccessMode defaultAccessMode()
      The type of access required by units of work in this session, e.g. read access or write access.
      Returns:
      the access mode.
    • database

      public Optional<String> database()
      The database where the session is going to connect to.
      Returns:
      the nullable database name where the session is going to connect to.
    • fetchSize

      public Optional<Long> fetchSize()
      This value if set, overrides the default fetch size set on Config.fetchSize().
      Returns:
      an optional value of fetch size.
    • impersonatedUser

      public Optional<String> impersonatedUser()
      The impersonated user the session is going to use for query execution.
      Returns:
      an optional value of the impersonated user.
    • bookmarkManager

      public Optional<BookmarkManager> bookmarkManager()
      A BookmarkManager implementation for the session to use.
      Returns:
      bookmark implementation
    • notificationConfig

      public NotificationConfig notificationConfig()
      Returns notification config.
      Returns:
      the notification config
      Since:
      5.7
    • minimumNotificationSeverity

      @Preview(name="GQL-status object") public Optional<NotificationSeverity> minimumNotificationSeverity()
      Returns a minimum notification severity.
      Returns:
      an Optional of minimum NotificationSeverity or an empty Optional if it is not set
      Since:
      5.22.0
    • disabledNotificationClassifications

      @Preview(name="GQL-status object") public Set<NotificationClassification> disabledNotificationClassifications()
      Returns a set of disabled notification classifications.
      Returns:
      the Set of disabled NotificationClassification
      Since:
      5.22.0
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object