|
1 | 1 | package s2.types; |
2 | 2 |
|
3 | 3 | public class AppendOutput { |
4 | | - public final long startSeqNum; |
5 | | - public final long endSeqNum; |
6 | | - public final long nextSeqNum; |
| 4 | + public final StreamPosition start; |
| 5 | + public final StreamPosition end; |
| 6 | + public final StreamPosition tail; |
7 | 7 |
|
8 | | - AppendOutput(long startSeqNum, long endSeqNum, long nextSeqNum) { |
9 | | - this.startSeqNum = startSeqNum; |
10 | | - this.endSeqNum = endSeqNum; |
11 | | - this.nextSeqNum = nextSeqNum; |
| 8 | + AppendOutput(StreamPosition start, StreamPosition end, StreamPosition tail) { |
| 9 | + this.start = start; |
| 10 | + this.end = end; |
| 11 | + this.tail = tail; |
12 | 12 | } |
13 | 13 |
|
14 | 14 | public static AppendOutput fromProto(s2.v1alpha.AppendOutput appendOutput) { |
15 | 15 | return new AppendOutput( |
16 | | - appendOutput.getStartSeqNum(), appendOutput.getEndSeqNum(), appendOutput.getNextSeqNum()); |
| 16 | + new StreamPosition(appendOutput.getStartSeqNum(), appendOutput.getStartTimestamp()), |
| 17 | + new StreamPosition(appendOutput.getEndSeqNum(), appendOutput.getEndTimestamp()), |
| 18 | + new StreamPosition(appendOutput.getNextSeqNum(), appendOutput.getLastTimestamp())); |
17 | 19 | } |
18 | 20 |
|
19 | 21 | @Override |
20 | 22 | public String toString() { |
21 | | - return String.format( |
22 | | - "AppendOutput[startSeqNum=%s, endSeqNum=%s, nextSeqNum=%s]", |
23 | | - startSeqNum, endSeqNum, nextSeqNum); |
| 23 | + return String.format("AppendOutput[start=%s, end=%s, tail=%s]", start, end, tail); |
24 | 24 | } |
25 | 25 | } |
0 commit comments