Esempio n. 1
0
  /**
   * {@inheritDoc}
   *
   * <p>We have already saved away the revision for this record.
   */
  protected void append(AppendRecord record, InputStream in, int length) throws JournalException {

    try {
      conHelper.exec(
          insertRevisionStmtSQL,
          record.getRevision(),
          getId(),
          record.getProducerId(),
          new StreamWrapper(in, length));

    } catch (SQLException e) {
      String msg = "Unable to append revision " + lockedRevision + ".";
      throw new JournalException(msg, e);
    }
  }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  *
  * <p>Save away the locked revision inside the newly appended record.
  */
 protected void appending(AppendRecord record) {
   record.setRevision(lockedRevision);
 }