|
Berkeley DB version 5.3.28 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BtreeCompressor
An interface specifying how Btree compression works.
Method Summary | |
---|---|
boolean |
compress(Database db,
DatabaseEntry prevKey,
DatabaseEntry prevData,
DatabaseEntry key,
DatabaseEntry data,
DatabaseEntry dest)
The application-specific Btree compress callback. |
boolean |
decompress(Database db,
DatabaseEntry prevKey,
DatabaseEntry prevData,
DatabaseEntry compressed,
DatabaseEntry key,
DatabaseEntry data)
The application-specific Btree decompress callback. |
Method Detail |
---|
boolean compress(Database db, DatabaseEntry prevKey, DatabaseEntry prevData, DatabaseEntry key, DatabaseEntry data, DatabaseEntry dest)
The compress function must return true on success and false on failure. If the compressed data is larger than dest.getUserBufferLength() the function should set the required length in the dest DatabaseEntry via setSize and return false.
db
- The enclosing database handle.prevKey
- A database entry representing the previous key from the compressed stream.prevData
- A database entry representing the data matching prevKey key entry.key
- A database entry representing representing the application supplied key.data
- A database entry representing representing the application supplied data.dest
- A database entry representing the data stored in the tree. This is where
the callback function should write the compressed data.boolean decompress(Database db, DatabaseEntry prevKey, DatabaseEntry prevData, DatabaseEntry compressed, DatabaseEntry key, DatabaseEntry data)
The decompress function must return true on success, and false on failure.
db
- The enclosing database handle.prevKey
- A database entry representing the previous key from the compressed stream.prevData
- A database entry representing the data matching prevKey key entry.compressed
- A database entry representing the data stored in the tree. That is the
compressed data.key
- A database entry representing representing the application supplied key.data
- A database entry representing representing the application supplied data.
|
Berkeley DB version 5.3.28 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |