Berkeley DB
version 4.2.52

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.
 

Method Detail

hash

public 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.


Berkeley DB
version 4.2.52

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.