| HEADER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--ru.biosoft.access.IndexTable
IndexTable extention of hash table for work with database indexes. Build index file for flat file and then use them.
| Field Summary | |
final static String | ENTRY_DELIMITERS_PROPERTY |
final static String | ENTRY_END_PROPERTY |
final static String | ENTRY_ID_PROPERTY |
final static String | ENTRY_START_PROPERTY |
final static String | INDEX_SUFFIX |
| Constructor Summary | |
IndexTable(RandomAccessFile f, String startKey, Properties properties)Creates a IndexTable, that contains indexes for entry searching by specified line (startKey). | |
| Method Summary | |
void | close() |
Index | get(String key)Gets the index value associated with index key. |
Index | put(RandomAccessFile f, ru.biosoft.access.Entry entry)Put new entry to the file and puts the corresponding entry index table. |
Index | put(RandomAccessFile f, String entry)Put new entry to the file and puts the corresponding entry index table. |
synchronized void | putIndex(String key, Index value)Put new index into index table. |
synchronized void | removeIndex(String key)Remove the key from the index table. |
| Methods inherited from class java.util.Hashtable |
size, isEmpty, keys, elements, contains, containsValue, containsKey, get, put, remove, putAll, clear, clone, toString, keySet, entrySet, values, equals, hashCode |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public final static String ENTRY_DELIMITERS_PROPERTY
public final static String ENTRY_END_PROPERTY
public final static String ENTRY_ID_PROPERTY
public final static String ENTRY_START_PROPERTY
public final static String INDEX_SUFFIX
| Constructor Detail |
public IndexTable(RandomAccessFile f, String startKey, Properties properties)
throws java.lang.Exception
Note. It is a very simple version. Only one index per entry is created. The index value is the first substring in the first approprate entry line (startKey).
| Method Detail |
public void close()
throws java.io.IOException
public Index get(String key)
public Index put(RandomAccessFile f, ru.biosoft.access.Entry entry)
throws java.lang.Exception
public Index put(RandomAccessFile f, String entry)
throws java.lang.Exception
public synchronized void putIndex(String key, Index value)
throws java.io.IOException
public synchronized void removeIndex(String key)
throws java.io.IOException
| Association Links |
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
Default value is: ";\t\r\n".
to Class java.lang.String
"ID".to Class java.lang.String
"//" .to Class java.lang.String
to Class java.util.Vector
to Class java.io.RandomAccessFile
to Class java.io.File
to Class org.apache.log4j.Category
| FOOTER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||