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.ObjectThe 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 newJournalStateinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()@NonNull PageIdnewLatestPage()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.StringtoString()
-
-
-
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 newJournalStateinstance.- 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-