| java.lang.Object jdbm.htree.HashNode jdbm.htree.HashDirectory
HashDirectory | final class HashDirectory extends HashNode implements Externalizable(Code) | | Hashtable directory page.
author: Alex Boisvert version: $Id: HashDirectory.java,v 1.5 2005/06/25 23:12:32 doomdark Exp $ |
BIT_SIZE | final static int BIT_SIZE(Code) | | Number of significant bits per directory level.
|
MAX_CHILDREN | final static int MAX_CHILDREN(Code) | | Maximum number of children in a directory.
(Must be a power of 2 -- if you update this value, you must also
update BIT_SIZE and MAX_DEPTH.)
|
MAX_DEPTH | final static int MAX_DEPTH(Code) | | Maximum number of levels (zero-based)
(4 * 8 bits = 32 bits, which is the size of an "int", and as
you know, hashcodes in Java are "ints")
|
serialVersionUID | final static long serialVersionUID(Code) | | |
HashDirectory | public HashDirectory()(Code) | | Public constructor used by serialization
|
HashDirectory | HashDirectory(byte depth)(Code) | | Construct a HashDirectory
Parameters: depth - Depth of this directory page. |
get | Object get(Object key) throws IOException(Code) | | Returns the value which is associated with the given key. Returns
null if there is not association for this key.
Parameters: key - key whose associated value is to be returned |
getRecid | long getRecid()(Code) | | Get the record identifier used to load this hashtable.
|
hashMask | int hashMask()(Code) | | Calculates the hashmask of this directory. The hashmask is the
bit mask applied to a hashcode to retain only bits that are
relevant to this directory level.
|
isEmpty | boolean isEmpty()(Code) | | Returns whether or not this directory is empty. A directory
is empty when it no longer contains buckets or sub-directories.
|
put | Object put(Object key, Object value) throws IOException(Code) | | Associates the specified value with the specified key.
Parameters: key - key with which the specified value is to be assocated. Parameters: value - value to be associated with the specified key. object which was previously associated with the given key,or null if no association existed. |
remove | Object remove(Object key) throws IOException(Code) | | Remove the value which is associated with the given key. If the
key does not exist, this method simply ignores the operation.
Parameters: key - key whose associated value is to be removed object which was associated with the given key, ornull if no association existed with given key. |
setPersistenceContext | void setPersistenceContext(RecordManager recman, long recid)(Code) | | Sets persistence context. This method must be called before any
persistence-related operation.
Parameters: recman - RecordManager which stores this directory Parameters: recid - Record id of this directory. |
|
|