예제 #1
0
파일: LogCursor.java 프로젝트: kanbang/Colt
  public synchronized void close() throws DatabaseException {

    logc.close(0);
  }
예제 #2
0
파일: LogCursor.java 프로젝트: kanbang/Colt
  /**
   * Return the next LogSequenceNumber and log record.
   *
   * <p>The current log position is advanced to the next record in the log, and its
   * LogSequenceNumber and data are returned. If the cursor has not been initialized, the first
   * available log record in the log will be returned.
   *
   * <p>
   *
   * @param lsn The returned LogSequenceNumber.
   *     <p>
   * @param data The returned log record.
   *     <p>
   * @return The status of the operation; a return of NOTFOUND indicates the last log record has
   *     already been returned or the log is empty.
   *     <p>
   *     <p>
   * @throws DatabaseException if a failure occurs.
   */
  public OperationStatus getNext(final LogSequenceNumber lsn, final DatabaseEntry data)
      throws DatabaseException {

    return OperationStatus.fromInt(logc.get(lsn, data, DbConstants.DB_NEXT));
  }
예제 #3
0
파일: LogCursor.java 프로젝트: kanbang/Colt
  /**
   * Get the log file version.
   *
   * <p>
   *
   * @return The log file version.
   *     <p>
   *     <p>
   * @throws DatabaseException if a failure occurs.
   */
  public int version() throws DatabaseException {

    return logc.version(0);
  }