|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiitb.con.indexing.isam.ISAMTree<K>
public class ISAMTree<K extends java.lang.Comparable<K>>
ISAMTree is index structure to index the instances based on their attribute.
ISAM stands for Indexed Sequential Access Method, a method for indexing data for fast retrieval. In an ISAM system, data is organized into records which are composed of fixed length fields. Records are stored sequentially (as leaf nodes), originally to speed access on a disk. A secondary set of hash tables (non-leaf nodes) contain "pointers" into the leaf-node blocks, allowing individual records to be retrieved without having to search the entire data set.
ISAM is a static indexing structure, works well for the structure involving few updates. That is the reason there is no update method provided. Hence user need to create index again if the data gets changed.
Field Summary |
---|
Fields inherited from interface iitb.con.indexing.IndexTree |
---|
LEAF_EXT, NON_LEAF_EXT |
Constructor Summary | |
---|---|
ISAMTree(java.lang.String fileName,
java.lang.String mode)
Constructs the ISAMTree for the specified index file |
Method Summary | |
---|---|
void |
close()
Closes the index structure files. |
void |
create(java.util.List<Node<K>> nodes)
Creates the index file for the give nodes list |
KeyList<K,java.lang.Short> |
getMetaIndex(K key)
Returns the meta-index of the index structure. |
int[] |
getValues(K key)
Retrieves the values for the specified key |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ISAMTree(java.lang.String fileName, java.lang.String mode) throws java.io.FileNotFoundException, java.io.IOException
fileName
- index file namemode
- file opening mode (r, rw)
java.io.FileNotFoundException
- if file not found
java.io.IOException
- if file operation failsMethod Detail |
---|
public void close() throws java.io.IOException
close
in interface IndexTree<K extends java.lang.Comparable<K>>
java.io.IOException
- if the file operation failspublic void create(java.util.List<Node<K>> nodes) throws java.io.IOException
create
in interface IndexTree<K extends java.lang.Comparable<K>>
nodes
- nodes list - Node
java.io.IOException
- if file operation failspublic KeyList<K,java.lang.Short> getMetaIndex(K key) throws java.io.IOException
getMetaIndex
in interface IndexTree<K extends java.lang.Comparable<K>>
key
- key of the index structure
KeyList
java.io.IOException
- if the file operation failspublic int[] getValues(K key) throws java.io.IOException
getValues
in interface IndexTree<K extends java.lang.Comparable<K>>
key
- key of the index structure
java.io.IOException
- if the file operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |