|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objecttokyocabinet.BDBCUR
public class BDBCUR
Cursor is a mechanism to access each record of B+ tree database in ascending or descending order.
| Field Summary | |
|---|---|
static int |
CPAFTER
cursor put mode: after |
static int |
CPBEFORE
cursor put mode: before |
static int |
CPCURRENT
cursor put mode: current |
| Constructor Summary | |
|---|---|
BDBCUR(BDB bdb)
Create a cursor object. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Release resources. |
boolean |
first()
Move the cursor to the first record. |
boolean |
jump(byte[] key)
Move the cursor to the front of records corresponding a key. |
boolean |
jump(java.lang.String key)
Move the cursor to the front of records corresponding a key. |
byte[] |
key()
Get the key of the record where the cursor is. |
java.lang.String |
key2()
Get the key of the record where the cursor is. |
boolean |
last()
Move the cursor to the last record. |
boolean |
next()
Move the cursor to the next record. |
boolean |
out()
Remove the record where the cursor is. |
boolean |
prev()
Move the cursor to the previous record. |
boolean |
put(byte[] value,
int cpmode)
Insert a record around the cursor. |
boolean |
put(java.lang.String value,
int cpmode)
Insert a record around the cursor. |
byte[] |
val()
Get the value of the record where the cursor is. |
java.lang.String |
val2()
Get the value of the record where the cursor is. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CPAFTER
public static final int CPBEFORE
public static final int CPCURRENT
| Constructor Detail |
|---|
public BDBCUR(BDB bdb)
bdb - the B+ tree database object.| Method Detail |
|---|
protected void finalize()
finalize in class java.lang.Objectpublic boolean first()
public boolean jump(byte[] key)
key - the key.
public boolean jump(java.lang.String key)
jump(byte[])public byte[] key()
public java.lang.String key2()
key()public boolean last()
public boolean next()
public boolean out()
public boolean prev()
public boolean put(byte[] value,
int cpmode)
value - the value.cpmode - detail adjustment: `BDBCUR.CPCURRENT', which means that the value of the
current record is overwritten, `BDBCUR.CPBEFORE', which means that the new record is
inserted before the current record, `BDBCUR.CPAFTER', which means that the new record is
inserted after the current record.
public boolean put(java.lang.String value,
int cpmode)
put(byte[], int)public byte[] val()
public java.lang.String val2()
val()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||