com.sleepycat.db
Interface DbHash
public interface DbHash
An interface specifying a hashing function, which imposes a total
ordering on the Hash database.
Method Summary |
int |
hash(Db db,
byte[] data,
int len)
The DbHash interface is used by the Db.setHash method. |
hash
int hash(Db db,
byte[] data,
int len)
- The DbHash interface is used by the Db.setHash method. This
interface defines the database-specific hash function. The
hash function must handle any key values used by the
application (possibly including zero-length keys).
- Parameters:
db
- the enclosing database handle.data
- the byte string to be hashed.len
- the length of the byte string in bytes.
- Returns:
- The DbHash interface returns a hash value of type
int.