Interface Journal

    • Method Detail

      • unregister

        boolean unregister​(RecordConsumer consumer)
        Unregister a record processor.
        Parameters:
        consumer - record processor to unregister
        Returns:
        true if the consumer was previously registered; false otherwise
      • sync

        void sync​(boolean startup)
           throws JournalException
        Synchronize contents from journal. This will compare the journal's revision with the revisions of all registered consumers and invoke their RecordConsumer.consume(org.apache.jackrabbit.core.journal.Record) method when their identifier matches the one found in the records. The startup flag allow for a separate treatment of the initial sync when the cluster nodes starts up. This might be needed for example when there are a lot of old revisions in a database.
        Parameters:
        startup - indicates if the cluster node is syncing on startup or does a normal sync.
        Throws:
        JournalException - if an error occurs
      • getProducer

        RecordProducer getProducer​(String identifier)
                            throws JournalException
        Return the record producer for a given identifier.
        Parameters:
        identifier - identifier
        Returns:
        the record producer for a given identifier.
        Throws:
        JournalException - if an error occurs
      • close

        void close()
        Close this journal. This should release any resources still held by this journal.
      • getRecords

        RecordIterator getRecords​(long startRevision)
                           throws JournalException
        Return an iterator over all records after the specified revision.
        Parameters:
        startRevision - start point (exlusive)
        Returns:
        an iterator over all records after the specified revision.
        Throws:
        JournalException - if an error occurs