logcursor.java

来自「berkeleyDB,强大的嵌入式数据,多个数据库的内核」· Java 代码 · 共 81 行

JAVA
81
字号
/*- * See the file LICENSE for redistribution information. * * Copyright (c) 2001-2004 *	Sleepycat Software.  All rights reserved. * * $Id: LogCursor.java,v 1.1 2004/04/06 20:43:40 mjc Exp $ */package com.sleepycat.db;import com.sleepycat.db.internal.DbConstants;import com.sleepycat.db.internal.DbLogc;public class LogCursor {    protected DbLogc logc;    protected LogCursor(final DbLogc logc) {        this.logc = logc;    }    /* package */    static LogCursor wrap(DbLogc logc) {        return (logc == null) ? null : new LogCursor(logc);    }    public synchronized void close()        throws DatabaseException {        logc.close(0);    }    public OperationStatus getCurrent(final LogSequenceNumber lsn,                                      final DatabaseEntry data)        throws DatabaseException {        return OperationStatus.fromInt(            logc.get(lsn, data, DbConstants.DB_CURRENT));    }    public OperationStatus getNext(final LogSequenceNumber lsn,                                   final DatabaseEntry data)        throws DatabaseException {        return OperationStatus.fromInt(            logc.get(lsn, data, DbConstants.DB_NEXT));    }    public OperationStatus getFirst(final LogSequenceNumber lsn,                                    final DatabaseEntry data)        throws DatabaseException {        return OperationStatus.fromInt(            logc.get(lsn, data, DbConstants.DB_FIRST));    }    public OperationStatus getLast(final LogSequenceNumber lsn,                                   final DatabaseEntry data)        throws DatabaseException {        return OperationStatus.fromInt(            logc.get(lsn, data, DbConstants.DB_LAST));    }    public OperationStatus getPrev(final LogSequenceNumber lsn,                                   final DatabaseEntry data)        throws DatabaseException {        return OperationStatus.fromInt(            logc.get(lsn, data, DbConstants.DB_PREV));    }    public OperationStatus set(final LogSequenceNumber lsn,                               final DatabaseEntry data)        throws DatabaseException {        return OperationStatus.fromInt(            logc.get(lsn, data, DbConstants.DB_SET));    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?