org.apache.jackrabbit.core.journal
Class DefaultRecordProducer

java.lang.Object
  extended by 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
DefaultRecordProducer(AbstractJournal journal, String id)
          Create a new instance of this class.
 
Method Summary
 Record append()
          Append a record.
protected  AppendRecord createRecord()
          Create a new record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRecordProducer

public DefaultRecordProducer(AbstractJournal journal,
                             String id)
Create a new instance of this class.

Parameters:
journal - journal
id - producer id
Method Detail

append

public Record append()
              throws JournalException
Append a record. This operation implicitely locks the journal revision and must be followed by either Record.update() or Record.cancelUpdate(). on the record returned.

Specified by:
append in interface RecordProducer
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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.