public interface BtreeCompressor
Modifier and Type | Method | Description |
---|---|---|
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.
|
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.Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.