Interface ComponentMethodRef<R>

Type Parameters:
R - The type of value returned by executing the call
All Superinterfaces:
ComponentDeferredMethodRef<R>

@DoNotInherit public interface ComponentMethodRef<R> extends ComponentDeferredMethodRef<R>
Zero argument component call representation, not executed until invoked or by some mechanism using the deferred call (like a timer executing it later for example)

Not for user extension or instantiation, returned by the SDK component client

  • Method Details

    • withMetadata

      ComponentMethodRef<R> withMetadata(Metadata metadata)
      Specified by:
      withMetadata in interface ComponentDeferredMethodRef<R>
    • withRetry

      ComponentInvokeOnlyMethodRef<R> withRetry(akka.pattern.RetrySettings retrySettings)
      Set the retry settings for this call.
      Parameters:
      retrySettings - The retry settings
      Returns:
      A new call with the retry settings set
    • withRetry

      ComponentInvokeOnlyMethodRef<R> withRetry(int maxRetries)
      Set the retry settings for this call. A predefined backoff strategy will be calculated based on the number of maxRetries.
      Parameters:
      maxRetries - The number of retries to make
      Returns:
      A new call with the retry settings set
    • invokeAsync

      CompletionStage<R> invokeAsync()
    • invoke

      R invoke()