|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.indexmanagement.jdbmwrapper.JdbmWrapper
public class JdbmWrapper
Class to store key and value pairs in the jdbm database
| Nested Class Summary | |
|---|---|
static class |
JdbmWrapper.DbTypeEnum
The enum forward index types datebase type. |
| Constructor Summary | |
|---|---|
JdbmWrapper(String treeDir,
String dbName,
String treeName,
JdbmWrapper.DbTypeEnum dbT)
Provides the ability to store simple key-value pairs. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this jdbmWrapper by deleting the whole index |
void |
deletePairInDb(Object key)
Deletes a key and value pair in the the tree. |
String |
getAllDec(boolean bKeysOnly)
Gets all. |
String |
getAllInc(boolean bKeysOnly)
Gets all. |
String |
getEQ(Object key,
boolean bKeysOnly)
Gets the values where the key equals the input key. |
String |
getGE(Object keyGE,
boolean bKeysOnly)
Gets values >= keyGE. |
String |
getGEandLE(Object keyGE,
Object keyLE,
boolean bKeysOnly)
Gets keyGE <= values <= keyLE |
String |
getGEandLT(Object keyGE,
Object keyLT,
boolean bKeysOnly)
Gets keyGE <= values < keyLT |
String |
getGT(Object keyGT,
boolean bKeysOnly)
Gets keyGT < values |
String |
getGTandLE(Object keyGT,
Object keyLE,
boolean bKeysOnly)
Gets keyGT < values <= keyLE |
String |
getGTandLT(Object keyGT,
Object keyLT,
boolean bKeysOnly)
Gets keyGT < values < keyLT |
String |
getLE(Object keyLE,
boolean bKeysOnly)
Gets values <= keyLE |
String |
getLT(Object keyLT,
boolean bKeysOnly)
Gets values < keyLT |
void |
insertPairInDb(Object key,
Object value)
Insert a key and value pair in the the tree. |
void |
insertRowSet(String rowset)
Inserts tuples in a rowset into the tree, parsing the values from a String. |
static void |
main(String[] args)
Test main. |
int |
mergeAddition(File inputIndex)
Receives the file with rowsets that is to be merged into the index. |
int |
mergeDeletion(File deletionFile)
THIS METHOD IS NEVER CALLED IN FORWARD INDEX. |
void |
updateIndex()
Updates the index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbmWrapper(String treeDir,
String dbName,
String treeName,
JdbmWrapper.DbTypeEnum dbT)
throws IndexException
treeDir - The base directorydbName - The nameof the databasetreeName - The name of the treedbT - The type of DB (int,string or float,string or string,string
date,string).
IndexException - - in case of failure.| Method Detail |
|---|
public void close()
throws Exception
Exception
public void insertPairInDb(Object key,
Object value)
throws IndexException
key - - the tuple key.value - - the tuple value.
IndexException - - when IOException is received.
public void deletePairInDb(Object key)
throws IndexException
key - - the tuple key.value - - the tuple value.
IndexException - - when IOException is received.
public void insertRowSet(String rowset)
throws IndexException
rowset - - the rowset containing the tuples
IndexException - - when parsing goes bonk.
public String getEQ(Object key,
boolean bKeysOnly)
throws IndexException
key - - The equality key for the searchbKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGE(Object keyGE,
boolean bKeysOnly)
throws IndexException
keyGE - - the keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGT(Object keyGT,
boolean bKeysOnly)
throws IndexException
keyGT - - The lower exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getLE(Object keyLE,
boolean bKeysOnly)
throws IndexException
keyLE - - The upper inclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getLT(Object keyLT,
boolean bKeysOnly)
throws IndexException
keyLT - - The upper exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGEandLE(Object keyGE,
Object keyLE,
boolean bKeysOnly)
throws IndexException
keyGE - - The lower inclusive boundkeyLE - - The upper inclusive boundbKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGEandLT(Object keyGE,
Object keyLT,
boolean bKeysOnly)
throws IndexException
keyGE - - The lower inclusive bound keykeyLT - - The upper exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGTandLE(Object keyGT,
Object keyLE,
boolean bKeysOnly)
throws IndexException
keyGT - - The lower exclusive boundkeyLE - - The upper inclusive boundbKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGTandLT(Object keyGT,
Object keyLT,
boolean bKeysOnly)
throws IndexException
keyGT - - The lower exclusive bound keykeyLT - - The upper exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getAllDec(boolean bKeysOnly)
throws IndexException
bKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getAllInc(boolean bKeysOnly)
throws IndexException
bKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public int mergeDeletion(File deletionFile)
throws IndexException
deletionFile - - the file with the content to delete .
IndexException - - in case of failure.
public int mergeAddition(File inputIndex)
throws IndexException
inputIndex - - The file with rowsets that is merged into the index.
IndexException - - in case of error.
public void updateIndex()
throws IndexException
IndexException - - in case of errorpublic static void main(String[] args)
args - - the array of arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||