Class InvocationOptions.Builder

java.lang.Object
dev.restate.common.InvocationOptions.Builder
Enclosing class:
InvocationOptions

public static final class InvocationOptions.Builder extends Object
  • Method Details

    • idempotencyKey

      public InvocationOptions.Builder idempotencyKey(String idempotencyKey)
      Parameters:
      idempotencyKey - Idempotency key to attach in the request.
      Returns:
      this instance, so the builder can be used fluently.
    • header

      public InvocationOptions.Builder header(String key, String value)
      Append this header to the list of configured headers.
      Parameters:
      key - header key
      value - header value
      Returns:
      this instance, so the builder can be used fluently.
    • headers

      public InvocationOptions.Builder headers(Map<String,String> newHeaders)
      Append the given header map to the list of headers.
      Parameters:
      newHeaders - headers to send together with the request.
      Returns:
      this instance, so the builder can be used fluently.
    • getIdempotencyKey

      public @Nullable String getIdempotencyKey()
    • setIdempotencyKey

      public void setIdempotencyKey(@Nullable String idempotencyKey)
      Parameters:
      idempotencyKey - Idempotency key to attach in the request.
    • getHeaders

      public @Nullable Map<String,String> getHeaders()
    • setHeaders

      public void setHeaders(@Nullable Map<String,String> headers)
      Parameters:
      headers - headers to send together with the request. This will overwrite the already configured headers
    • build

      public InvocationOptions build()
      Returns:
      build the request