Class EndpointDiagnostics
- java.lang.Object
-
- com.couchbase.client.core.diagnostics.EndpointDiagnostics
-
public class EndpointDiagnostics extends Object
A diagnostic report for an individual endpoint.Usually this diagnostic information is not looked at in isolation, but rather as part of the overall
DiagnosticsResult.
-
-
Constructor Summary
Constructors Constructor Description EndpointDiagnostics(ServiceType type, EndpointState state, CircuitBreaker.State circuitBreakerState, String local, String remote, Optional<String> namespace, Optional<Long> lastActivityUs, Optional<String> id, Optional<Throwable> lastConnectAttemptFailure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CircuitBreaker.StatecircuitBreakerState()The current state of the endpoint's circuit breakerbooleanequals(Object o)inthashCode()Optional<String>id()The ID for this endpoint.Optional<Duration>lastActivity()If there has been a last activity, returned as a duration.Optional<Throwable>lastConnectAttemptFailure()If present, returns the last connect failure of this endpoint.Stringlocal()The local socket address for this endpoint.Optional<String>namespace()The namespace of this endpoint (likely the bucket name if present).Stringremote()The remote socket address for this endpoint.EndpointStatestate()The current state of the endpoint.StringtoString()ServiceTypetype()The service type for this endpoint.
-
-
-
Constructor Detail
-
EndpointDiagnostics
@Internal public EndpointDiagnostics(ServiceType type, EndpointState state, CircuitBreaker.State circuitBreakerState, String local, String remote, Optional<String> namespace, Optional<Long> lastActivityUs, Optional<String> id, Optional<Throwable> lastConnectAttemptFailure)
-
-
Method Detail
-
type
public ServiceType type()
The service type for this endpoint.
-
local
public String local()
The local socket address for this endpoint.
-
remote
public String remote()
The remote socket address for this endpoint.
-
lastActivity
public Optional<Duration> lastActivity()
If there has been a last activity, returned as a duration.
-
state
public EndpointState state()
The current state of the endpoint.
-
circuitBreakerState
@Volatile public CircuitBreaker.State circuitBreakerState()
The current state of the endpoint's circuit breaker
-
namespace
public Optional<String> namespace()
The namespace of this endpoint (likely the bucket name if present).
-
lastConnectAttemptFailure
@Volatile public Optional<Throwable> lastConnectAttemptFailure()
If present, returns the last connect failure of this endpoint.- Returns:
- the last connect failure, if any.
-
-