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 Summary
Constructors Constructor Description DiagnosticsResult(Map<ServiceType,List<EndpointDiagnostics>> endpoints, String sdk, String id)
Creates the new diagnostics report.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<ServiceType,List<EndpointDiagnostics>>
endpoints()
Returns the diagnostic reports of each individual endpoint.boolean
equals(Object o)
String
exportToJson()
Exports this report into the standard JSON format which is consistent across different SDKs.int
hashCode()
String
id()
The ID of this report.String
sdk()
The identifier of this SDK (useful when exporting to JSON).ClusterState
state()
Returns the aggregated and simplified cluster state.String
toString()
int
version()
The version of this report (useful when exporting to JSON).
-
-
-
Constructor Detail
-
DiagnosticsResult
@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 Detail
-
id
public String id()
The ID of this report.- Returns:
- the ID, either automatically generated or the one provided by the user.
-
version
public int version()
The version of this report (useful when exporting to JSON).- Returns:
- the version format of this report.
-
sdk
public String sdk()
The identifier of this SDK (useful when exporting to JSON).- Returns:
- the identifier of this SDK.
-
endpoints
public Map<ServiceType,List<EndpointDiagnostics>> endpoints()
Returns the diagnostic reports of each individual endpoint.
-
state
public ClusterState state()
Returns the aggregated and simplified cluster state.
-
exportToJson
public String exportToJson()
Exports this report into the standard JSON format which is consistent across different SDKs.- Returns:
- the report encoded as JSON.
-
-