Class CurrentMongoStatus

java.lang.Object
org.eclipse.ditto.internal.utils.health.mongo.CurrentMongoStatus

@Immutable public final class CurrentMongoStatus extends Object
Reflects the currently determined MongoDB health status. Whether alive or not including a description.
  • Constructor Details

    • CurrentMongoStatus

      public CurrentMongoStatus(boolean alive)
      Constructs a new CurrentMongoStatus object.
      Parameters:
      alive - indicates whether the Persistence is alive.
    • CurrentMongoStatus

      public CurrentMongoStatus(boolean alive, String description)
      Constructs a new CurrentMongoStatus object.
      Parameters:
      alive - indicates whether the Persistence is alive.
      description - an optional description why it is alive/not alive.
  • Method Details

    • isAlive

      public boolean isAlive()
      Returns whether the Persistence is alive.
      Returns:
      whether the Persistence is alive.
    • getDescription

      public Optional<String> getDescription()
      Returns an optional description why it is alive/not alive.
      Returns:
      an optional description why it is alive/not alive.
    • 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