Package io.datareplication.producer.feed
Class FeedProducerJournalRepository.JournalState
- java.lang.Object
-
- io.datareplication.producer.feed.FeedProducerJournalRepository.JournalState
-
- Enclosing interface:
- FeedProducerJournalRepository
public static final class FeedProducerJournalRepository.JournalState extends java.lang.Object
The rollback information stored by the feed producer to allow clean rollbacks. The repository implementation must save and load all fields accurately.
-
-
Constructor Summary
Constructors Constructor Description JournalState(@NonNull java.util.List<@NonNull PageId> newPages, @NonNull PageId newLatestPage, @NonNull java.util.Optional<@NonNull PageId> previousLatestPage)
Creates a newJournalState
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
@NonNull PageId
newLatestPage()
ID of the latest feed page when the active transaction completes.@NonNull java.util.List<@NonNull PageId>
newPages()
List of IDs of pages that were created by the currently active transaction.@NonNull java.util.Optional<@NonNull PageId>
previousLatestPage()
ID of the latest feed page at the start of the transaction, if different fromnewLatestPage()
.java.lang.String
toString()
-
-
-
Constructor Detail
-
JournalState
public JournalState(@NonNull @NonNull java.util.List<@NonNull PageId> newPages, @NonNull @NonNull PageId newLatestPage, @NonNull @NonNull java.util.Optional<@NonNull PageId> previousLatestPage)
Creates a newJournalState
instance.- Parameters:
newPages
- List of IDs of pages that were created by the currently active transaction.newLatestPage
- ID of the latest feed page when the active transaction completes.previousLatestPage
- ID of the latest feed page at the start of the transaction, if different fromnewLatestPage()
.
-
-
Method Detail
-
newPages
@NonNull public @NonNull java.util.List<@NonNull PageId> newPages()
List of IDs of pages that were created by the currently active transaction.
-
newLatestPage
@NonNull public @NonNull PageId newLatestPage()
ID of the latest feed page when the active transaction completes.
-
previousLatestPage
@NonNull public @NonNull java.util.Optional<@NonNull PageId> previousLatestPage()
ID of the latest feed page at the start of the transaction, if different fromnewLatestPage()
.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-