Interface NotificationConfig

All Superinterfaces:
Serializable

@Preview(name="GQL-status object") public sealed interface NotificationConfig extends Serializable
A notification configuration defining what notifications should be supplied by the server.

There are currently 2 optional settings that may be activated:

  • Minimum notification severity - sets a baseline severity for notifications, similar to the logging levels.
  • A set of disabled notification categories - explicitly disables a set of notification categories.

By default, both options are not activated.

Disabling categories or severities allows the server to skip analysis for those, which can speed up query execution.

Since:
5.7
See Also:
  • Method Details

    • defaultConfig

      static NotificationConfig defaultConfig()
      Returns a default notification configuration.

      The default configuration has no settings activated, meaning the resulting behaviour depends on an upstream context. For instance, when this config is set on the session level, the resulting behaviour depends on the driver's config. Likewise, when this config is set on the driver level, the resulting behaviour depends on the server.

      Returns:
      the default config
    • disableAllConfig

      static NotificationConfig disableAllConfig()
      A config that disables all notifications.
      Returns:
      the config that disables all notifications
    • enableMinimumSeverity

      NotificationConfig enableMinimumSeverity(NotificationSeverity minimumSeverity)
      Returns a config that sets a minimum severity level for notifications.
      Parameters:
      minimumSeverity - the minimum severity level
      Returns:
      the config
    • disableCategories

      NotificationConfig disableCategories(Set<NotificationCategory> disabledCategories)
      Returns a config that disables a set of notification categories.
      Parameters:
      disabledCategories - the categories to disable, an empty set means no categories are disabled
      Returns:
      the config