Class AcquireResponse
java.lang.Object
software.amazon.awssdk.retries.internal.circuitbreaker.AcquireResponse
- All Implemented Interfaces:
ToCopyableBuilder<AcquireResponse.Builder,
AcquireResponse>
public final class AcquireResponse
extends Object
implements ToCopyableBuilder<AcquireResponse.Builder,AcquireResponse>
The number of tokens in the token bucket after a specific token acquisition succeeds.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the requested capacity was not successfully acquired.static AcquireResponse.Builder
builder()
int
The number of tokens acquired by the last token acquisition.int
The number of tokens in the token bucket.int
The numbers of token requested by the last token acquisition.int
The max capacity.Take this object and create a builder that contains all of the current property values of this object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
builder
-
maxCapacity
public int maxCapacity()The max capacity. -
capacityRequested
public int capacityRequested()The numbers of token requested by the last token acquisition. -
capacityAcquired
public int capacityAcquired()The number of tokens acquired by the last token acquisition. -
capacityRemaining
public int capacityRemaining()The number of tokens in the token bucket. -
acquisitionFailed
public boolean acquisitionFailed()Returnstrue
if the requested capacity was not successfully acquired. -
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<AcquireResponse.Builder,
AcquireResponse> - Returns:
- a builder for type T
-