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.
  • Method Details

    • builder

      public static AcquireResponse.Builder 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()
      Returns true if the requested capacity was not successfully acquired.
    • toBuilder

      public AcquireResponse.Builder 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 interface ToCopyableBuilder<AcquireResponse.Builder,AcquireResponse>
      Returns:
      a builder for type T