-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle discontinuity and heartbeat in topics and add sequence p…
…age to topics
- Loading branch information
1 parent
68ee067
commit 0a1d047
Showing
9 changed files
with
139 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
momento-sdk/src/main/java/momento/sdk/responses/topic/TopicDiscontinuity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package momento.sdk.responses.topic; | ||
|
||
public class TopicDiscontinuity { | ||
private final Integer lastSequenceNumber; | ||
private final Integer newSequenceNumber; | ||
private final Integer newSequencePage; | ||
|
||
public TopicDiscontinuity(Integer lastSequenceNumber, Integer newSequenceNumber, Integer newSequencePage) { | ||
this.lastSequenceNumber = lastSequenceNumber; | ||
this.newSequenceNumber = newSequenceNumber; | ||
this.newSequencePage = newSequencePage; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "TopicDiscontinuity{" + | ||
"lastSequenceNumber=" + lastSequenceNumber + | ||
", newSequenceNumber=" + newSequenceNumber + | ||
", newSequencePage=" + newSequencePage + | ||
'}'; | ||
} | ||
|
||
/* | ||
* Gets the last sequence number. | ||
*/ | ||
public Integer getLastSequenceNumber() { | ||
return lastSequenceNumber; | ||
} | ||
|
||
/* | ||
* Gets the new sequence number. | ||
*/ | ||
public Integer getNewSequenceNumber() { | ||
return newSequenceNumber; | ||
} | ||
|
||
/* | ||
* Gets the new sequence page. | ||
*/ | ||
public Integer getNewSequencePage() { | ||
return newSequencePage; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters