|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mybatchfwk.history.KeysFileIndexer
public class KeysFileIndexer
The KeysFileIndexer classe is used in order to index keys contained into a file (one line = one key).
This indexer (based on the HashMap class) store into the memory only the hash key and the line number of each key
(so it can be used to work with a large number of keys).
| Constructor Summary | |
|---|---|
KeysFileIndexer(java.io.File keysFile,
java.lang.String mode)
Constructs an empty KeysFileIndexer with the default initial capacity (16) and the default load factor (0.75). |
|
| Method Summary | |
|---|---|
void |
addKey(java.lang.String key)
Add a new key to the end of the file |
protected void |
buildIndex()
Index the keys of the file |
void |
closeReader()
Close the keys reader |
boolean |
containsKey(java.lang.String key)
Returns true if this map contains a mapping for the specified key. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
protected void |
putKey(long pointer,
java.lang.String key)
Add a new entry from the given key |
int |
size()
Returns the number of key-value mappings in this map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KeysFileIndexer(java.io.File keysFile,
java.lang.String mode)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
protected void buildIndex()
throws java.io.IOException
java.io.IOException
public void closeReader()
throws java.io.IOException
java.io.IOExceptionpublic int size()
public boolean isEmpty()
public void addKey(java.lang.String key)
throws java.io.IOException
key -
java.io.IOException
protected void putKey(long pointer,
java.lang.String key)
pointer - key -
public boolean containsKey(java.lang.String key)
throws java.io.IOException
key - The key whose presence in this map is to be tested
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||