Interface Journal

All Known Implementing Classes:
LocalKafkaJournal, NoopJournal

public interface Journal
  • Method Details

    • createEntry

      Journal.Entry createEntry(byte[] idBytes, byte[] messageBytes)
    • write

      long write(List<Journal.Entry> entries)
    • write

      long write(byte[] idBytes, byte[] messageBytes)
    • read

      List<Journal.JournalReadEntry> read(long maximumCount)
    • markJournalOffsetCommitted

      void markJournalOffsetCommitted(long offset)
    • flush

      void flush()
    • getJournalUtilization

      default Optional<Double> getJournalUtilization()
      Returns an Optional containing the current journal utilization as a percentage of the maximum retention size. This default implementation returns an empty Optional, indicating that no utilization data is available.
      Returns:
      an Optional<Double> representing the journal utilization percentage, or an empty Optional if utilization data is unavailable.
    • runRetention

      int runRetention()
      Executes the retention policy on the journal, deleting outdated or excess data based on the configured retention rules.
      Returns:
      an integer representing the amount of data deleted during the retention process.