Class DefaultRecordProducer
- java.lang.Object
-
- org.apache.jackrabbit.core.journal.DefaultRecordProducer
-
- All Implemented Interfaces:
RecordProducer
public class DefaultRecordProducer extends Object implements RecordProducer
Produces new records that can be appended to the journal.
-
-
Constructor Summary
Constructors Constructor Description DefaultRecordProducer(AbstractJournal journal, String id)
Create a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Record
append()
Append a record.protected AppendRecord
createRecord()
Create a new record.
-
-
-
Constructor Detail
-
DefaultRecordProducer
public DefaultRecordProducer(AbstractJournal journal, String id)
Create a new instance of this class.- Parameters:
journal
- journalid
- producer id
-
-
Method Detail
-
append
public Record append() throws JournalException
Append a record. This operation implicitly locks the journal revision and must be followed by eitherRecord.update()
orRecord.cancelUpdate()
. on the record returned.- Specified by:
append
in interfaceRecordProducer
- Returns:
- appended record
- Throws:
JournalException
- if an error occurs
-
createRecord
protected AppendRecord createRecord() throws JournalException
Create a new record. May be overridden by subclasses.- Throws:
JournalException
- if an error occurs
-
-