Record Class InMemorySchedulerOptions

java.lang.Object
java.lang.Record
org.j7m.middleware.scheduler.InMemorySchedulerOptions
Record Components:
schedulerId - scheduler id
runtimeId - hosting runtime id
registryContext - registry context
clock - scheduler clock
security - security configuration used for authorization and resource policy
maxTasks - maximum retained tasks
maxConcurrentExecutions - maximum concurrently executing tasks
streamBufferSize - bounded stream buffer size
maxStreamItemBytes - maximum approximate stream item size
defaultLeaseDuration - default lease duration

public record InMemorySchedulerOptions(String schedulerId, String runtimeId, String registryContext, Clock clock, org.j7m.middleware.security.api.SecurityConfiguration security, int maxTasks, int maxConcurrentExecutions, int streamBufferSize, int maxStreamItemBytes, Duration defaultLeaseDuration) extends Record
Immutable options for InMemoryWorkloadScheduler.
  • Constructor Details

    • InMemorySchedulerOptions

      public InMemorySchedulerOptions(String schedulerId, String runtimeId, String registryContext, Clock clock, org.j7m.middleware.security.api.SecurityConfiguration security, int maxTasks, int maxConcurrentExecutions, int streamBufferSize, int maxStreamItemBytes, Duration defaultLeaseDuration)
      Creates validated options.
  • Method Details

    • defaults

      public static InMemorySchedulerOptions defaults(String schedulerId, String runtimeId)
      Returns conservative development defaults.
      Parameters:
      schedulerId - scheduler id
      runtimeId - runtime id
      Returns:
      options
    • maxMetadataEntries

      public int maxMetadataEntries()
      Returns the maximum number of metadata entries accepted by scheduler admission, progress, checkpoint, result, and fan-out paths.
      Returns:
      metadata entry limit
    • maxMetadataValueBytes

      public int maxMetadataValueBytes()
      Returns the maximum UTF-8 byte length accepted for one metadata key or value.
      Returns:
      per-string metadata byte limit
    • maxProgressMessageBytes

      public int maxProgressMessageBytes()
      Returns the maximum UTF-8 byte length accepted for a progress message.
      Returns:
      progress message byte limit
    • maxCheckpointMetadataBytes

      public int maxCheckpointMetadataBytes()
      Returns the maximum aggregate UTF-8 byte length retained for checkpoint metadata.
      Returns:
      checkpoint metadata byte limit
    • maxFanOutTargets

      public int maxFanOutTargets()
      Returns the maximum number of fan-out or scatter-gather targets accepted in one request.
      Returns:
      target count limit
    • maxRetainedFanOutResults

      public int maxRetainedFanOutResults()
      Returns the maximum number of successful or failed fan-out results retained in one response.
      Returns:
      retained result limit
    • maxAggregateResultBytes

      public int maxAggregateResultBytes()
      Returns the maximum aggregate UTF-8 byte length retained for fan-out and scatter-gather response values and failure metadata.
      Returns:
      aggregate result byte limit
    • defaultMaxPayloadBytes

      public int defaultMaxPayloadBytes()
      Returns the finite payload limit applied when a task submission leaves TaskOptions.maxPayloadBytes() at zero.

      The API default remains source compatible with earlier callers, but scheduler admission treats zero as this bounded implementation default rather than as an unbounded payload allowance.

      Returns:
      default payload byte limit
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schedulerId

      public String schedulerId()
      Returns the value of the schedulerId record component.
      Returns:
      the value of the schedulerId record component
    • runtimeId

      public String runtimeId()
      Returns the value of the runtimeId record component.
      Returns:
      the value of the runtimeId record component
    • registryContext

      public String registryContext()
      Returns the value of the registryContext record component.
      Returns:
      the value of the registryContext record component
    • clock

      public Clock clock()
      Returns the value of the clock record component.
      Returns:
      the value of the clock record component
    • security

      public org.j7m.middleware.security.api.SecurityConfiguration security()
      Returns the value of the security record component.
      Returns:
      the value of the security record component
    • maxTasks

      public int maxTasks()
      Returns the value of the maxTasks record component.
      Returns:
      the value of the maxTasks record component
    • maxConcurrentExecutions

      public int maxConcurrentExecutions()
      Returns the value of the maxConcurrentExecutions record component.
      Returns:
      the value of the maxConcurrentExecutions record component
    • streamBufferSize

      public int streamBufferSize()
      Returns the value of the streamBufferSize record component.
      Returns:
      the value of the streamBufferSize record component
    • maxStreamItemBytes

      public int maxStreamItemBytes()
      Returns the value of the maxStreamItemBytes record component.
      Returns:
      the value of the maxStreamItemBytes record component
    • defaultLeaseDuration

      public Duration defaultLeaseDuration()
      Returns the value of the defaultLeaseDuration record component.
      Returns:
      the value of the defaultLeaseDuration record component