|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.db.DbLogc
public class DbLogc
The DbLogc object is the handle for a cursor into the log files,
supporting sequential access to the records stored in log files.
The handle is not free-threaded. Once the DbLogc.close
method is called, the
handle may not be accessed again, regardless of that method's
return.
Field Summary | |
---|---|
protected boolean |
swigCMemOwn
|
Constructor Summary | |
---|---|
protected |
DbLogc()
|
protected |
DbLogc(long cPtr,
boolean cMemoryOwn)
|
Method Summary | |
---|---|
void |
close(int flags)
The DbLogc.close method discards the log cursor. |
protected void |
delete()
|
int |
get(DbLsn lsn,
Dbt data,
int flags)
The DbLogc.get method returns records from the log. |
protected static long |
getCPtr(DbLogc obj)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean swigCMemOwn
Constructor Detail |
---|
protected DbLogc(long cPtr, boolean cMemoryOwn)
protected DbLogc()
Method Detail |
---|
protected void delete()
protected static long getCPtr(DbLogc obj)
public void close(int flags) throws DbException
flags
- currently unused, and must
be set to 0.
java.lang.IllegalArgumentException
- The DbLogc.close method will
fail and throw a IllegalArgumentException exception if the
cursor was previously closed; or if an invalid flag value
or parameter was specified.
DbException
public int get(DbLsn lsn, Dbt data, int flags) throws DbException
data
- The data field of the
data structure is set to the record retrieved, and the
size field indicates the number of bytes in the record.
See Dbt
for a description of
other fields in the data structure. The Db.DB_DBT_MALLOC
,
Db.DB_DBT_REALLOC
and Db.DB_DBT_USERMEM
flags may be specified for any Dbt
used for data retrieval.flags
- must be set to one of the
following values:
Db.DB_CURRENT
Return the log record to which the log currently refers.
Db.DB_FIRST
The first record from any of the log files found in the
log directory is returned in the data parameter.
overwritten with the DbLsn
of the record returned.
Db.DB_LAST
The last record in the log is returned in the data
parameter. overwritten with the DbLsn
of the record returned.
Db.DB_NEXT
The current log position is advanced to the next record
in the log, and that record is returned in the data
parameter. overwritten with the DbLsn
of the record returned.
If the cursor has not been initialized via DB_FIRST, DB_LAST, DB_SET, DB_NEXT, or DB_PREV, DbLogc.get will return the first record in the log.
Db.DB_PREV
The current log position is advanced to the previous
record in the log, and that record is returned in the
data parameter. overwritten with the DbLsn
of the record returned.
If the cursor has not been initialized via DB_FIRST, DB_LAST, DB_SET, DB_NEXT, or DB_PREV, DbLogc.get will return the last record in the log.
Db.DB_SET
Retrieve the record specified by the lsn parameter.
lsn
- When the flag
parameter is set to Db.DB_CURRENT, Db.DB_FIRST,
Db.DB_LAST, Db.DB_NEXT or Db.DB_PREV, the lsn
parameter is overwritten with the DbLsn
value of the record
retrieved. When flag is set to Db.DB_SET, the
lsn parameter is the DbLsn
value of the record to be retrieved.
DB_NOTFOUND
The DbLogc.get method will return
Db.DB_NOTFOUND
if Db.DB_FIRST
is set and the log is empty.
DB_NOTFOUND
The DbLogc.get method will return
Db.DB_NOTFOUND
if Db.DB_LAST
is set and the log is empty.
DB_NOTFOUND
The DbLogc.get method will return
Db.DB_NOTFOUND
if Db.DB_NEXT
is set and the last log record has already been returned
or the log is empty.
DB_NOTFOUND
The DbLogc.get method will return
Db.DB_NOTFOUND
if Db.DB_PREV
is set and the first log record has already been
returned or the log is empty.
java.lang.IllegalArgumentException
- The DbLogc.get method will
fail and throw a IllegalArgumentException exception if the
Db.DB_CURRENT flag was set and the log cursor has not yet
been initialized; the Db.DB_CURRENT, Db.DB_NEXT, or
Db.DB_PREV flags were set and the log was opened with the
DB_THREAD flag set; the Db.DB_SET flag was set and the
specified log sequence number does not appear in the log;
or if an invalid flag value or parameter was specified.
DbException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |