Class DiagnosticsResult

java.lang.Object
com.couchbase.client.core.diagnostics.DiagnosticsResult

public class DiagnosticsResult extends Object
This report provides insight into the current cluster state from the point of view of the client.
  • Constructor Details Link icon

    • DiagnosticsResult Link icon

      @Internal public DiagnosticsResult(Map<ServiceType,List<EndpointDiagnostics>> endpoints, String sdk, String id)
      Creates the new diagnostics report.

      Note that this is internal API and should not be called at the application level.

      Parameters:
      endpoints - the health of each individual endpoint.
      sdk - the sdk identifier.
      id - the report ID.
  • Method Details Link icon

    • id Link icon

      public String id()
      The ID of this report.
      Returns:
      the ID, either automatically generated or the one provided by the user.
    • version Link icon

      public int version()
      The version of this report (useful when exporting to JSON).
      Returns:
      the version format of this report.
    • sdk Link icon

      public String sdk()
      The identifier of this SDK (useful when exporting to JSON).
      Returns:
      the identifier of this SDK.
    • endpoints Link icon

      public Map<ServiceType,List<EndpointDiagnostics>> endpoints()
      Returns the diagnostic reports of each individual endpoint.
    • state Link icon

      public ClusterState state()
      Returns the aggregated and simplified cluster state.
    • exportToJson Link icon

      public String exportToJson()
      Exports this report into the standard JSON format which is consistent across different SDKs.
      Returns:
      the report encoded as JSON.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • equals Link icon

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

      public int hashCode()
      Overrides:
      hashCode in class Object