Class 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 new JournalState 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 from newLatestPage().
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 new JournalState 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 from newLatestPage().
    • 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 from newLatestPage().
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object