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 TypeMethodDescriptionbooleanReturnstrueif the requested capacity was not successfully acquired.static AcquireResponse.Builderbuilder()intThe number of tokens acquired by the last token acquisition.intThe number of tokens in the token bucket.intThe numbers of token requested by the last token acquisition.intThe 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, waitMethods 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()Returnstrueif the requested capacity was not successfully acquired. -
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<AcquireResponse.Builder,AcquireResponse> - Returns:
- a builder for type T
-