public LogSeqNum append(Constant[] rec){
  logMgrLock.lock();
  try {
    int recsize=pointerSize * 2;
    for (    Constant c : rec)     recsize+=Page.size(c);
    if (currentPos + recsize >= BLOCK_SIZE) {
      flush();
      appendNewBlock();
    }
    LogSeqNum lsn=currentLSN();
    for (    Constant c : rec)     appendVal(c);
    finalizeRecord();
    lastLsn=lsn;
    return lsn;
  }
  finally {
    logMgrLock.unlock();
  }
}

public LogSeqNum append ( Constant [ ] rec ) { logMgrLock . lock ( ) ; try { int recsize = pointerSize * 2 ; for ( Constant c : rec ) recsize += Page . size ( c ) ; if ( currentPos + recsize >= BLOCK_SIZE ) { flush ( ) ; appendNewBlock ( ) ; } LogSeqNum lsn = currentLSN ( ) ; for ( Constant c : rec ) appendVal ( c ) ; finalizeRecord ( ) ; lastLsn = lsn ; return lsn ; } finally { logMgrLock . unlock ( ) ; } }
appends a log record to the file . the record contains an arbitrary array of values . the method also writes an integer to the end of each log record whose value is the offset of the corresponding integer for the previous log record . these integers allow log records to be read in reverse order .
