@Generated(value={"Immutables.generator","AbstractCircuitBreakerStatus"}) public final class CircuitBreakerStatus extends Object implements AbstractCircuitBreakerStatus
AbstractCircuitBreakerStatus.
Use the builder to create immutable instances: CircuitBreakerStatus.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
CircuitBreakerStatus.Builder
Builds instances of type
CircuitBreakerStatus. |
| Modifier and Type | Method and Description |
|---|---|
static CircuitBreakerStatus.Builder |
builder()
Creates a builder for
CircuitBreakerStatus. |
static CircuitBreakerStatus |
copyOf(AbstractCircuitBreakerStatus instance)
Creates an immutable copy of a
AbstractCircuitBreakerStatus value. |
boolean |
equals(Object another)
This instance is equal to all instances of
CircuitBreakerStatus that have equal
attribute values. |
double |
getFailedThroughputOneMinute()
Failed calls per second for the last minute.
|
String |
getId()
Circuit breaker identifier.
|
Latency |
getLatencyMicros()
Latency distribution for Exponentially Decaying Reservoir.
|
String |
getState()
Circuit breaker state; closed, open, half-open.
|
double |
getThroughputOneMinute()
Total (successful + failed) calls per second for the last minute.
|
Instant |
getTimestamp() |
long |
getTotalFailureCount()
Total number of failed calls.
|
long |
getTotalSuccessCount()
Total number of successful calls.
|
int |
hashCode()
Computes a hash code from attributes:
id, timestamp, state, totalSuccessCount, totalFailureCount, latencyMicros, throughputOneMinute, failedThroughputOneMinute. |
String |
toString()
Prints the immutable value
CircuitBreakerStatus... with all non-generated and
non-auxiliary attribute values. |
CircuitBreakerStatus |
withFailedThroughputOneMinute(double value)
Copy the current immutable object by setting a value for the
failedThroughputOneMinute
attribute. |
CircuitBreakerStatus |
withId(String value)
Copy the current immutable object by setting a value for the
id attribute. |
CircuitBreakerStatus |
withLatencyMicros(Latency value)
Copy the current immutable object by setting a value for the
latencyMicros attribute. |
CircuitBreakerStatus |
withState(String value)
Copy the current immutable object by setting a value for the
state attribute. |
CircuitBreakerStatus |
withThroughputOneMinute(double value)
Copy the current immutable object by setting a value for the
throughputOneMinute attribute. |
CircuitBreakerStatus |
withTimestamp(Instant value)
Copy the current immutable object by setting a value for the
timestamp attribute. |
CircuitBreakerStatus |
withTotalFailureCount(long value)
Copy the current immutable object by setting a value for the
totalFailureCount attribute. |
CircuitBreakerStatus |
withTotalSuccessCount(long value)
Copy the current immutable object by setting a value for the
totalSuccessCount attribute. |
public String getId()
getId in interface AbstractCircuitBreakerStatuspublic Instant getTimestamp()
getTimestamp in interface AbstractCircuitBreakerStatustimestamp attributepublic String getState()
getState in interface AbstractCircuitBreakerStatuspublic long getTotalSuccessCount()
getTotalSuccessCount in interface AbstractCircuitBreakerStatuspublic long getTotalFailureCount()
getTotalFailureCount in interface AbstractCircuitBreakerStatuspublic Latency getLatencyMicros()
getLatencyMicros in interface AbstractCircuitBreakerStatuspublic double getThroughputOneMinute()
getThroughputOneMinute in interface AbstractCircuitBreakerStatuspublic double getFailedThroughputOneMinute()
getFailedThroughputOneMinute in interface AbstractCircuitBreakerStatuspublic final CircuitBreakerStatus withId(String value)
id attribute. A shallow reference equality check is used
to prevent copying of the same value by returning this.value - A new value for idthis objectpublic final CircuitBreakerStatus withTimestamp(Instant value)
timestamp attribute. A shallow reference equality
check is used to prevent copying of the same value by returning this.value - A new value for timestampthis objectpublic final CircuitBreakerStatus withState(String value)
state attribute. A shallow reference equality check is
used to prevent copying of the same value by returning this.value - A new value for statethis objectpublic final CircuitBreakerStatus withTotalSuccessCount(long value)
totalSuccessCount attribute. A value
equality check is used to prevent copying of the same value by returning this.value - A new value for totalSuccessCountthis objectpublic final CircuitBreakerStatus withTotalFailureCount(long value)
totalFailureCount attribute. A value
equality check is used to prevent copying of the same value by returning this.value - A new value for totalFailureCountthis objectpublic final CircuitBreakerStatus withLatencyMicros(Latency value)
latencyMicros attribute. A shallow reference
equality check is used to prevent copying of the same value by returning this.value - A new value for latencyMicrosthis objectpublic final CircuitBreakerStatus withThroughputOneMinute(double value)
throughputOneMinute attribute.value - A new value for throughputOneMinutethis objectpublic final CircuitBreakerStatus withFailedThroughputOneMinute(double value)
failedThroughputOneMinute
attribute.value - A new value for failedThroughputOneMinutethis objectpublic boolean equals(Object another)
CircuitBreakerStatus that have equal
attribute values.public int hashCode()
id, timestamp, state, totalSuccessCount, totalFailureCount, latencyMicros, throughputOneMinute, failedThroughputOneMinute.public String toString()
CircuitBreakerStatus... with all non-generated and
non-auxiliary attribute values.public static CircuitBreakerStatus copyOf(AbstractCircuitBreakerStatus instance)
AbstractCircuitBreakerStatus value. Uses accessors to
get values to initialize the new immutable instance. If an instance is already immutable, it is
returned as is.instance - The instance to copypublic static CircuitBreakerStatus.Builder builder()
CircuitBreakerStatus.