Enum Class MongoDriverSettings.InitialDatabaseUnavailableMode

java.lang.Object
java.lang.Enum<MongoDriverSettings.InitialDatabaseUnavailableMode>
io.vena.bosk.drivers.mongo.MongoDriverSettings.InitialDatabaseUnavailableMode
All Implemented Interfaces:
Serializable, Comparable<MongoDriverSettings.InitialDatabaseUnavailableMode>, Constable
Enclosing class:
MongoDriverSettings

public static enum MongoDriverSettings.InitialDatabaseUnavailableMode extends Enum<MongoDriverSettings.InitialDatabaseUnavailableMode>
  • Enum Constant Details

    • DISCONNECT

      If the database state can't be loaded during BoskDriver.initialRoot(java.lang.reflect.Type), use the downstream driver's initial state and proceed in disconnected mode. This allows the database and application to be booted in either order, which can simplify repairs and recovery in production, but during development, it can cause confusing behaviour if the database is misconfigured.

      In the spirit of making things "just work in production", this is the default, but you might want to consider using FAIL in non-production settings.

    • FAIL

      If the database state can't be loaded during BoskDriver.initialRoot(java.lang.reflect.Type), throw an exception. This is probably the desired "fail fast" behaviour during development, but in production, it creates a boot sequencing dependency between the application and the database.
  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null