Package akka.javasdk.workflow
Record Class Workflow.PauseSettingsBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionPauseSettingsBuilder(Duration timeout) PauseSettingsBuilder(Duration timeout, Optional<String> reason) Creates an instance of aPauseSettingsBuilderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.Specify pause reasontimeout()Returns the value of thetimeoutrecord component.timeoutHandler(akka.japi.function.Function<W, Workflow.Effect<akka.Done>> timeoutHandler) Configures the handler to be invoked when the pause timeout expires.<W,I> Workflow.PauseSettings timeoutHandler(akka.japi.function.Function2<W, I, Workflow.Effect<akka.Done>> timeoutHandler, I input) Configures the handler to be invoked when the pause timeout expires.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PauseSettingsBuilder
-
PauseSettingsBuilder
Creates an instance of aPauseSettingsBuilderrecord class.- Parameters:
timeout- the value for thetimeoutrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
reason
Specify pause reason- Parameters:
reason- pause reason
-
timeoutHandler
public <W> Workflow.PauseSettings timeoutHandler(akka.japi.function.Function<W, Workflow.Effect<akka.Done>> timeoutHandler) Configures the handler to be invoked when the pause timeout expires.The pause timeout handler is a regular workflow command handler that returns a
Workflow.Effect<akka.Done>.The handler function should be specified as a Java method reference, e.g. MyWorkflow::pauseTimeoutHandler
-
timeoutHandler
public <W,I> Workflow.PauseSettings timeoutHandler(akka.japi.function.Function2<W, I, Workflow.Effect<akka.Done>> timeoutHandler, I input) Configures the handler to be invoked when the pause timeout expires.The pause timeout handler is a regular workflow command handler that returns a
Workflow.Effect<akka.Done>.The handler function should be specified as a Java method reference, e.g. MyWorkflow::pauseTimeoutHandler
This overload allows you to pass additional input to the timeout handler, when additional context or data that should be captured at the time of pause configuration.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-