Class AbstractJournalRM.JournalImpl

    • Constructor Detail

      • JournalImpl

        protected JournalImpl()
    • Method Detail

      • write

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

        public int release​(long lTicket)
        Notify the Journal that the value corresponding to the specified ticket is no longer needed.
        Specified by:
        release in interface Journal
        Parameters:
        lTicket - a ticket returned from a previous call to Journal.write(com.tangosol.util.Binary)
        Returns:
        the number of bytes released
      • dispose

        public void dispose()
        Invoked when all resources owned by the implementer can safely be released.

        Once disposed of the object should no longer be considered to be usable.

        Note the Disposable interface is compatible with try-with-resources which will automatically invoke this method.

        Specified by:
        dispose in interface Disposable
      • getConsumer

        protected Journal.JournalConsumer getConsumer()
        Obtain the JournalConsumer (typically a JournalBinaryStore) instance associated with this JournalImpl.
        Returns:
        the JournalConsumer that this JournalImpl was created for
      • setConsumer

        protected void setConsumer​(Journal.JournalConsumer consumer)
        Specify the JournalConsumer (typically a JournalBinaryStore) instance that this JournalImpl was created for.
        Parameters:
        consumer - a JournalConsumer
      • writeOverflow

        protected long writeOverflow​(Binary bin)
        Handle the case in which the write overflows the capacity of the journal.
        Parameters:
        bin - the Binary to write
        Returns:
        a ticket
        Throws:
        IllegalStateException - if nothing can be done to store the data
      • instantiateJournalFullException

        protected RuntimeException instantiateJournalFullException()
        Return a RuntimeException indicating the Journal is out of capacity.
        Returns:
        a RuntimeException indicating the Journal is out of capacity