-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathAppendRecord.java
More file actions
36 lines (32 loc) · 931 Bytes
/
AppendRecord.java
File metadata and controls
36 lines (32 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package io.kurrent.dbclient;
/**
* Represents a record to be appended to a specific stream in an
* {@link KurrentDBClient#appendRecords} operation.
* Each record specifies its own target stream, allowing interleaved writes across multiple streams.
*/
public class AppendRecord {
private final String stream;
private final EventData record;
/**
* Creates a new AppendRecord targeting the specified stream.
*
* @param stream the name of the target stream for this record.
* @param record the event data to append.
*/
public AppendRecord(String stream, EventData record) {
this.stream = stream;
this.record = record;
}
/**
* Returns the name of the target stream.
*/
public String getStream() {
return stream;
}
/**
* Returns the event data to append.
*/
public EventData getRecord() {
return record;
}
}