Package io.namastack.springoutbox
Class OutboxRecord.Builder
-
- All Implemented Interfaces:
public final class OutboxRecord.BuilderBuilder class for creating new OutboxRecord instances.
-
-
Constructor Summary
Constructors Constructor Description OutboxRecord.Builder()
-
Method Summary
Modifier and Type Method Description final OutboxRecord.BuilderaggregateId(String aggregateId)Sets the aggregate ID for the outbox record. final OutboxRecord.BuildereventType(String eventType)Sets the event type for the outbox record. final OutboxRecord.Builderpayload(String payload)Sets the payload for the outbox record. final OutboxRecordbuild(Clock clock)Builds the OutboxRecord with the configured values. -
-
Method Detail
-
aggregateId
final OutboxRecord.Builder aggregateId(String aggregateId)
Sets the aggregate ID for the outbox record.
- Parameters:
aggregateId- Identifier of the aggregate- Returns:
this Builder instance for method chaining
-
eventType
final OutboxRecord.Builder eventType(String eventType)
Sets the event type for the outbox record.
- Parameters:
eventType- Type/name of the event- Returns:
this Builder instance for method chaining
-
payload
final OutboxRecord.Builder payload(String payload)
Sets the payload for the outbox record.
- Parameters:
payload- Event payload in serialized form- Returns:
this Builder instance for method chaining
-
build
final OutboxRecord build(Clock clock)
Builds the OutboxRecord with the configured values.
- Parameters:
clock- Clock to use for timestamps (defaults to system UTC)- Returns:
A new OutboxRecord instance
-
-
-
-