|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.store.RandomAccessObjectStore<T>
T
- The object type to be stored.public class RandomAccessObjectStore<T extends Storeable>
Provides a store for writing objects to a file for later retrieval. The number of objects is limited only by disk space.
Constructor Summary | |
---|---|
RandomAccessObjectStore(ObjectSerializationFactory serializationFactory,
java.io.File storageFile)
Creates a new instance. |
|
RandomAccessObjectStore(ObjectSerializationFactory serializationFactory,
java.lang.String tempFilePrefix)
Creates a new instance. |
Method Summary | |
---|---|
long |
add(T data)
Adds the specified object to the store. |
void |
complete()
Ensures that all information is fully persisted. |
RandomAccessObjectStoreReader<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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomAccessObjectStore(ObjectSerializationFactory serializationFactory, java.lang.String tempFilePrefix)
serializationFactory
- The factory defining the object serialisation implementation.tempFilePrefix
- The prefix of the temporary file.public RandomAccessObjectStore(ObjectSerializationFactory serializationFactory, java.io.File storageFile)
serializationFactory
- The factory defining the object serialisation implementation.storageFile
- The storage file to use.Method Detail |
---|
public long add(T data)
data
- The object to be added.
public RandomAccessObjectStoreReader<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 |