Record Class TaskOptions
java.lang.Object
java.lang.Record
org.j7m.middleware.workload.api.TaskOptions
- Record Components:
deliverySemantics- requested delivery semanticsidempotencyKey- optional idempotency keyduplicateDetectionKey- optional duplicate-detection keydeadline- maximum time the scheduler should keep or run the taskretryPolicy- retry policy for idempotent workpriority- relative priority, higher values are preferredorderingRequirement- ordering requirementshardKey- optional shard keymaxPayloadBytes- payload limitmaxResultBytes- result limitbackpressureMode- requested backpressure modemetadata- safe options metadata
public record TaskOptions(DeliverySemantics deliverySemantics, String idempotencyKey, String duplicateDetectionKey, Duration deadline, RetryPolicy retryPolicy, int priority, OrderingRequirement orderingRequirement, ShardKey shardKey, int maxPayloadBytes, int maxResultBytes, BackpressureMode backpressureMode, Map<String,String> metadata)
extends Record
Immutable task submission options.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskOptions(DeliverySemantics deliverySemantics, String idempotencyKey, String duplicateDetectionKey, Duration deadline, RetryPolicy retryPolicy, int priority, OrderingRequirement orderingRequirement, ShardKey shardKey, int maxPayloadBytes, int maxResultBytes, BackpressureMode backpressureMode, Map<String, String> metadata) Creates validated immutable options. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackpressureModerecord component.deadline()Returns the value of thedeadlinerecord component.static TaskOptionsdefaults()Returns conservative default options.Returns the value of thedeliverySemanticsrecord component.Returns the value of theduplicateDetectionKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theidempotencyKeyrecord component.intReturns the value of themaxPayloadBytesrecord component.intReturns the value of themaxResultBytesrecord component.metadata()Returns the value of themetadatarecord component.Returns the value of theorderingRequirementrecord component.intpriority()Returns the value of thepriorityrecord component.Returns the value of theretryPolicyrecord component.shardKey()Returns the value of theshardKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskOptions
public TaskOptions(DeliverySemantics deliverySemantics, String idempotencyKey, String duplicateDetectionKey, Duration deadline, RetryPolicy retryPolicy, int priority, OrderingRequirement orderingRequirement, ShardKey shardKey, int maxPayloadBytes, int maxResultBytes, BackpressureMode backpressureMode, Map<String, String> metadata) Creates validated immutable options.
-
-
Method Details
-
defaults
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
deliverySemantics
Returns the value of thedeliverySemanticsrecord component.- Returns:
- the value of the
deliverySemanticsrecord component
-
idempotencyKey
Returns the value of theidempotencyKeyrecord component.- Returns:
- the value of the
idempotencyKeyrecord component
-
duplicateDetectionKey
Returns the value of theduplicateDetectionKeyrecord component.- Returns:
- the value of the
duplicateDetectionKeyrecord component
-
deadline
-
retryPolicy
Returns the value of theretryPolicyrecord component.- Returns:
- the value of the
retryPolicyrecord component
-
priority
-
orderingRequirement
Returns the value of theorderingRequirementrecord component.- Returns:
- the value of the
orderingRequirementrecord component
-
shardKey
-
maxPayloadBytes
public int maxPayloadBytes()Returns the value of themaxPayloadBytesrecord component.- Returns:
- the value of the
maxPayloadBytesrecord component
-
maxResultBytes
public int maxResultBytes()Returns the value of themaxResultBytesrecord component.- Returns:
- the value of the
maxResultBytesrecord component
-
backpressureMode
Returns the value of thebackpressureModerecord component.- Returns:
- the value of the
backpressureModerecord component
-
metadata
-