Interface Journal

  • All Superinterfaces:
    AutoCloseable, Disposable
    All Known Implementing Classes:
    AbstractJournalRM.JournalImpl, BackupJournalRM.JournalImpl, RamJournalRM.JournalImpl

    public interface Journal
    extends Disposable
    The Journal interface represents data that is written as part of a stream of updates, with the ability to identify writes (and later read them) using a ticket system. The Journal does not support erasure, but does allow the Journal to discard data that has been written previously as long as it has been "released" via this interface.
    Since:
    Coherence 3.7
    Author:
    cp 2010-06-10
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Journal.JournalConsumer
      An interface that represents the actions that a Journal may request of an object that uses the Journal.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Binary read​(long lTicket)
      Using a ticket returned from a previous call to write(com.tangosol.util.Binary), read the Binary value that was written to the Journal.
      int release​(long lTicket)
      Notify the Journal that the value corresponding to the specified ticket is no longer needed.
      long write​(Binary bin)
      Write a Binary value to the Journal and return a ticket for it.
    • Method Detail

      • write

        long write​(Binary bin)
        Write a Binary value to the Journal and return a ticket for it.
        Parameters:
        bin - the Binary to write to the Journal
        Returns:
        the ticket that can later be used to access the Binary
      • release

        int release​(long lTicket)
        Notify the Journal that the value corresponding to the specified ticket is no longer needed.
        Parameters:
        lTicket - a ticket returned from a previous call to write(com.tangosol.util.Binary)
        Returns:
        the number of bytes released
        Throws:
        IllegalStateException - may be thrown if the passed ticket had already been released