Record Class SagaConfig
java.lang.Object
java.lang.Record
org.j7m.middleware.saga.SagaConfig
- Record Components:
eventLogDirectory- directory for durable saga event log statemessagingDirectory- directory for durable outbox and inbox stateclock- service clock used for deterministic timeout and retry evaluationmaxActiveSagas- maximum number of non-terminal saga executionsmaxStepsPerSaga- maximum steps allowed in one definitionmaxRetryAttempts- maximum retry attempts allowed by policiesmaxPendingOutboxCommands- maximum pending durable outbox commandsmaxCommandPayloadBytes- maximum command payload size accepted at startmaxEvidenceEntries- maximum evidence records retained in public statusmaxDeadLettersInStatus- maximum dead-letter records exposed in public statusmaxCheckpointBytes- maximum canonical checkpoint body bytes accepted for write and recovery
public record SagaConfig(Path eventLogDirectory, Path messagingDirectory, Clock clock, int maxActiveSagas, int maxStepsPerSaga, int maxRetryAttempts, int maxPendingOutboxCommands, int maxCommandPayloadBytes, int maxEvidenceEntries, int maxDeadLettersInStatus, int maxCheckpointBytes)
extends Record
Configuration for a local durable saga service.
The configuration owns local durable-log and messaging directories and enforces bounded resource use. Paths are local filesystem paths; the service does not use an external workflow engine or transaction coordinator.
-
Constructor Summary
ConstructorsConstructorDescriptionSagaConfig(Path eventLogDirectory, Path messagingDirectory, Clock clock, int maxActiveSagas, int maxStepsPerSaga, int maxRetryAttempts, int maxPendingOutboxCommands, int maxCommandPayloadBytes, int maxEvidenceEntries, int maxDeadLettersInStatus) Creates a validated configuration using the default checkpoint byte limit.SagaConfig(Path eventLogDirectory, Path messagingDirectory, Clock clock, int maxActiveSagas, int maxStepsPerSaga, int maxRetryAttempts, int maxPendingOutboxCommands, int maxCommandPayloadBytes, int maxEvidenceEntries, int maxDeadLettersInStatus, int maxCheckpointBytes) Creates a validated configuration. -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.static SagaConfigCreates a local default configuration.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theeventLogDirectoryrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxActiveSagasrecord component.intReturns the value of themaxCheckpointBytesrecord component.intReturns the value of themaxCommandPayloadBytesrecord component.intReturns the value of themaxDeadLettersInStatusrecord component.intReturns the value of themaxEvidenceEntriesrecord component.intReturns the value of themaxPendingOutboxCommandsrecord component.intReturns the value of themaxRetryAttemptsrecord component.intReturns the value of themaxStepsPerSagarecord component.Returns the value of themessagingDirectoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SagaConfig
public SagaConfig(Path eventLogDirectory, Path messagingDirectory, Clock clock, int maxActiveSagas, int maxStepsPerSaga, int maxRetryAttempts, int maxPendingOutboxCommands, int maxCommandPayloadBytes, int maxEvidenceEntries, int maxDeadLettersInStatus, int maxCheckpointBytes) Creates a validated configuration. -
SagaConfig
public SagaConfig(Path eventLogDirectory, Path messagingDirectory, Clock clock, int maxActiveSagas, int maxStepsPerSaga, int maxRetryAttempts, int maxPendingOutboxCommands, int maxCommandPayloadBytes, int maxEvidenceEntries, int maxDeadLettersInStatus) Creates a validated configuration using the default checkpoint byte limit.- Parameters:
eventLogDirectory- directory for durable saga event log statemessagingDirectory- directory for durable outbox and inbox stateclock- service clock used for deterministic timeout and retry evaluationmaxActiveSagas- maximum number of non-terminal saga executionsmaxStepsPerSaga- maximum steps allowed in one definitionmaxRetryAttempts- maximum retry attempts allowed by policiesmaxPendingOutboxCommands- maximum pending durable outbox commandsmaxCommandPayloadBytes- maximum command payload size accepted at startmaxEvidenceEntries- maximum evidence records retained in public statusmaxDeadLettersInStatus- maximum dead-letter records exposed in public status
-
-
Method Details
-
defaults
Creates a local default configuration.- Parameters:
directory- root directory for service state- Returns:
- validated default configuration rooted below
directory
-
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. -
eventLogDirectory
Returns the value of theeventLogDirectoryrecord component.- Returns:
- the value of the
eventLogDirectoryrecord component
-
messagingDirectory
Returns the value of themessagingDirectoryrecord component.- Returns:
- the value of the
messagingDirectoryrecord component
-
clock
-
maxActiveSagas
public int maxActiveSagas()Returns the value of themaxActiveSagasrecord component.- Returns:
- the value of the
maxActiveSagasrecord component
-
maxStepsPerSaga
public int maxStepsPerSaga()Returns the value of themaxStepsPerSagarecord component.- Returns:
- the value of the
maxStepsPerSagarecord component
-
maxRetryAttempts
public int maxRetryAttempts()Returns the value of themaxRetryAttemptsrecord component.- Returns:
- the value of the
maxRetryAttemptsrecord component
-
maxPendingOutboxCommands
public int maxPendingOutboxCommands()Returns the value of themaxPendingOutboxCommandsrecord component.- Returns:
- the value of the
maxPendingOutboxCommandsrecord component
-
maxCommandPayloadBytes
public int maxCommandPayloadBytes()Returns the value of themaxCommandPayloadBytesrecord component.- Returns:
- the value of the
maxCommandPayloadBytesrecord component
-
maxEvidenceEntries
public int maxEvidenceEntries()Returns the value of themaxEvidenceEntriesrecord component.- Returns:
- the value of the
maxEvidenceEntriesrecord component
-
maxDeadLettersInStatus
public int maxDeadLettersInStatus()Returns the value of themaxDeadLettersInStatusrecord component.- Returns:
- the value of the
maxDeadLettersInStatusrecord component
-
maxCheckpointBytes
public int maxCheckpointBytes()Returns the value of themaxCheckpointBytesrecord component.- Returns:
- the value of the
maxCheckpointBytesrecord component
-