|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.store.IndexStore<K,T>
K
- The index key type.T
- The index element type to be stored.public class IndexStore<K,T extends IndexElement<K>>
Writes data into an index file and sorts it if input data is unordered. The data must be fixed width to allow index values to be randomly accessed later.
Constructor Summary | |
---|---|
IndexStore(java.lang.Class<T> elementType,
java.util.Comparator<K> ordering,
java.io.File indexFile)
Creates a new instance. |
|
IndexStore(java.lang.Class<T> elementType,
java.util.Comparator<K> ordering,
java.lang.String tempFilePrefix)
Creates a new instance. |
Method Summary | |
---|---|
void |
complete()
Ensures that all information is fully persisted. |
IndexStoreReader<K,T> |
createReader()
Creates a new reader capable of accessing the contents of this store. |
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
void |
write(T element)
Writes the specified element to the index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexStore(java.lang.Class<T> elementType, java.util.Comparator<K> ordering, java.io.File indexFile)
elementType
- The type of index element to be stored in the index.ordering
- A comparator that sorts index elements desired index key
ordering.indexFile
- The file to use for storing the index.public IndexStore(java.lang.Class<T> elementType, java.util.Comparator<K> ordering, java.lang.String tempFilePrefix)
elementType
- The type of index element to be stored in the index.ordering
- A comparator that sorts index elements desired index key
ordering.tempFilePrefix
- The prefix of the temporary file.Method Detail |
---|
public void write(T element)
element
- The index element which includes the identifier when stored.public IndexStoreReader<K,T> createReader()
public void complete()
complete
in interface Completable
public void release()
release
in interface Releasable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |