Package com.sleepycat.db
Class MultipleRecnoDataEntry
java.lang.Object
com.sleepycat.db.DatabaseEntry
com.sleepycat.db.MultipleEntry
com.sleepycat.db.MultipleRecnoDataEntry
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct an entry with no data.MultipleRecnoDataEntry(byte[] data) Construct an entry with a given byte array.MultipleRecnoDataEntry(byte[] data, int offset, int size) Constructs a DatabaseEntry with a given byte array, offset and size. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappend(int recno, byte[] data) Append an entry to the bulk buffer.booleanappend(int recno, byte[] data, int offset, int len) Append a record number / data item pair to the bulk buffer.booleanappend(int recno, DatabaseEntry data) Append an entry to the bulk buffer.booleannext(DatabaseEntry recnoEntry, DatabaseEntry data) Get the next record number/data pair in the returned set.Methods inherited from class com.sleepycat.db.MultipleEntry
append_internal, append_internal, setUserBufferMethods inherited from class com.sleepycat.db.DatabaseEntry
equals, getData, getDataNIO, getOffset, getPartial, getPartialLength, getPartialOffset, getReadOnly, getRecordNumber, getReuseBuffer, getSize, getUserBuffer, getUserBufferLength, hashCode, setData, setData, setDataNIO, setDataNIO, setOffset, setPartial, setPartial, setPartialLength, setPartialOffset, setReadOnly, setRecordNumber, setReuseBuffer, setSize
-
Constructor Details
-
MultipleRecnoDataEntry
public MultipleRecnoDataEntry()Construct an entry with no data. The object must be configured before use with theMultipleEntry.setUserBuffermethod. -
MultipleRecnoDataEntry
public MultipleRecnoDataEntry(byte[] data) Construct an entry with a given byte array. The offset is set to zero; the size is set to the length of the array. If null is passed, the object must be configured before use with theMultipleEntry.setUserBuffermethod.- Parameters:
data- Byte array wrapped by the entry.
-
MultipleRecnoDataEntry
public MultipleRecnoDataEntry(byte[] data, int offset, int size) Constructs a DatabaseEntry with a given byte array, offset and size.- Parameters:
data- Byte array wrapped by the DatabaseEntry.offset- Offset in the first byte in the byte array to be included.size- Number of bytes in the byte array to be included.
-
-
Method Details
-
next
Get the next record number/data pair in the returned set. This method may only be called after a successful call to aDatabaseorCursorget method with this object as the data parameter.When used with the Queue and Recno access methods,
data.getData()will returnnullfor deleted records.- Parameters:
recnoEntry- an entry that is set to refer to the next record number in the returned set.data- an entry that is set to refer to the next data element in the returned set.- Returns:
- indicates whether a value was found. A return of
falseindicates that the end of the set was reached.
-
append
Append a record number / data item pair to the bulk buffer.- Parameters:
recno- the record number of the record to be added.data- an array containing the value to be added.offset- the position in the data array where the record starts.len- the length of the record, in bytes, to be copied from the data array.- Returns:
- indicates whether there was space. A return of
falseindicates that the specified entry could not fit in the buffer. - Throws:
DatabaseException
-
append
Append an entry to the bulk buffer.- Parameters:
recno- the record number of the record to be added.data- the value to be appended, using the offset and size specified in theDatabaseEntry.- Returns:
- indicates whether there was space. A return of
falseindicates that the specified entry could not fit in the buffer. - Throws:
DatabaseException
-
append
Append an entry to the bulk buffer.- Parameters:
recno- the record number of the record to be added.data- an array containing the value to be added.- Returns:
- indicates whether there was space. A return of
falseindicates that the specified entry could not fit in the buffer. - Throws:
DatabaseException
-