Record Class CompletionConfig.CompletionDecision
java.lang.Object
java.lang.Record
software.amazon.lambda.durable.config.CompletionConfig.CompletionDecision
- Record Components:
shouldComplete- true if the concurrent operation should complete nowcompletionStatus- status to report when completing, or null when continuing
- Enclosing class:
- CompletionConfig
public static record CompletionConfig.CompletionDecision(boolean shouldComplete, ConcurrencyCompletionStatus completionStatus)
extends Record
The completion decision returned by
CompletionConfig.completionDecisionFunction().-
Constructor Summary
ConstructorsConstructorDescriptionCompletionDecision(boolean shouldComplete, ConcurrencyCompletionStatus completionStatus) Creates an instance of aCompletionDecisionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncomplete(ConcurrencyCompletionStatus completionStatus) Returns the value of thecompletionStatusrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanReturns the value of theshouldCompleterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompletionDecision
Creates an instance of aCompletionDecisionrecord class.- Parameters:
shouldComplete- the value for theshouldCompleterecord componentcompletionStatus- the value for thecompletionStatusrecord component
-
-
Method Details
-
complete
public static CompletionConfig.CompletionDecision complete(ConcurrencyCompletionStatus completionStatus) -
continueExecution
-
isSucceeded
public boolean isSucceeded() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
shouldComplete
public boolean shouldComplete()Returns the value of theshouldCompleterecord component.- Returns:
- the value of the
shouldCompleterecord component
-
completionStatus
Returns the value of thecompletionStatusrecord component.- Returns:
- the value of the
completionStatusrecord component
-