Interface LimitEntry.Builder

  • Method Details

    • dimensions

      LimitEntry.Builder dimensions(Map<String,String> dimensions)

      Map of dimension name to dimension value, matching the parent limit's dimensionKeys. Keys must exactly match the dimensionKeys. Values may be "" as a wildcard. "" may only appear at trailing positions (based on dimensionKeys ordering).

      Parameters:
      dimensions - Map of dimension name to dimension value, matching the parent limit's dimensionKeys. Keys must exactly match the dimensionKeys. Values may be "" as a wildcard. "" may only appear at trailing positions (based on dimensionKeys ordering).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requests

      Request rate limits (RPS or RPM). Limited to 1 entry for now.

      Parameters:
      requests - Request rate limits (RPS or RPM). Limited to 1 entry for now.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requests

      LimitEntry.Builder requests(RateConfig... requests)

      Request rate limits (RPS or RPM). Limited to 1 entry for now.

      Parameters:
      requests - Request rate limits (RPS or RPM). Limited to 1 entry for now.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • requests

      Request rate limits (RPS or RPM). Limited to 1 entry for now.

      This is a convenience method that creates an instance of the RateConfig.Builder avoiding the need to create one manually via RateConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to requests(List<RateConfig>).

      Parameters:
      requests - a consumer that will call methods on RateConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tokens

      Token rate limits (TPM). Limited to 1 entry for now. — P1

      Parameters:
      tokens - Token rate limits (TPM). Limited to 1 entry for now. — P1
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tokens

      LimitEntry.Builder tokens(RateConfig... tokens)

      Token rate limits (TPM). Limited to 1 entry for now. — P1

      Parameters:
      tokens - Token rate limits (TPM). Limited to 1 entry for now. — P1
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tokens

      Token rate limits (TPM). Limited to 1 entry for now. — P1

      This is a convenience method that creates an instance of the RateConfig.Builder avoiding the need to create one manually via RateConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tokens(List<RateConfig>).

      Parameters:
      tokens - a consumer that will call methods on RateConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • connections

      LimitEntry.Builder connections(Collection<RateConfig> connections)

      Connection rate limits (per second only). Limited to 1 entry for now. — P2

      Parameters:
      connections - Connection rate limits (per second only). Limited to 1 entry for now. — P2
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • connections

      LimitEntry.Builder connections(RateConfig... connections)

      Connection rate limits (per second only). Limited to 1 entry for now. — P2

      Parameters:
      connections - Connection rate limits (per second only). Limited to 1 entry for now. — P2
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • connections

      LimitEntry.Builder connections(Consumer<RateConfig.Builder>... connections)

      Connection rate limits (per second only). Limited to 1 entry for now. — P2

      This is a convenience method that creates an instance of the RateConfig.Builder avoiding the need to create one manually via RateConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to connections(List<RateConfig>).

      Parameters:
      connections - a consumer that will call methods on RateConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: