|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.buffer.storage.file.FileStorageManager
public class FileStorageManager
This class stores batches in files on disk in a specified directory. Every tuple source gets it's own set of files, named b_id_num where id is the unique id value of the TupleSourceID, and num is a file counter for the files associated with the TupleSourceID. Batches are stored random access into the file, typically but not necessarily in order. An in memory data structure stores info about all open files and where the batches are in the file (file pointers and lengths).
| Field Summary |
|---|
| Fields inherited from interface com.metamatrix.common.buffer.StorageManager |
|---|
TYPE_DATABASE, TYPE_FILE, TYPE_REMOTE |
| Constructor Summary | |
|---|---|
FileStorageManager()
|
|
| Method Summary | |
|---|---|
void |
addBatch(TupleSourceID sourceID,
TupleBatch batch,
java.lang.String[] types)
Add a batch to the storage manager. |
TupleBatch |
getBatch(TupleSourceID sourceID,
int beginRow,
java.lang.String[] types)
Get a batch from the storage manager based on the beginRow. |
int |
getOpenFiles()
|
void |
initialize(java.util.Properties props)
Initialize with properties |
void |
removeBatches(TupleSourceID sourceID)
Remove all batches for a sourceID. |
void |
shutdown()
This method removes all storage area files by walking through the file info map and closing and removing each file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileStorageManager()
| Method Detail |
|---|
public void initialize(java.util.Properties props)
throws MetaMatrixComponentException
initialize in interface StorageManagerprops - Initialization properties
MetaMatrixComponentException - indicating a non-business-related
exception (such as a communication exception)BufferManagerPropertyNames.BUFFER_STORAGE_DIRECTORY,
BufferManagerPropertyNames.MAX_OPEN_FILES,
BufferManagerPropertyNames.MAX_FILE_SIZE
public void addBatch(TupleSourceID sourceID,
TupleBatch batch,
java.lang.String[] types)
throws MetaMatrixComponentException
addBatch in interface StorageManagersourceID - Source identifierbatch - Batch to addtypes - a hint to the StorageManager about the types of data in the batch
MetaMatrixComponentException - indicating a non-business-related
exception (such as a communication exception)
public TupleBatch getBatch(TupleSourceID sourceID,
int beginRow,
java.lang.String[] types)
throws TupleSourceNotFoundException,
MetaMatrixComponentException
getBatch in interface StorageManagersourceID - Source identifierbeginRow - Beginning row of batch to retrievetypes - a hint to the StorageManager about the types of data in the batch
TupleSourceNotFoundException - indicating the sourceID is unknown
MetaMatrixComponentException - indicating a non-business-related
exception (such as a communication exception)
public void removeBatches(TupleSourceID sourceID)
throws MetaMatrixComponentException
removeBatches in interface StorageManagersourceID - Tuple source ID
MetaMatrixComponentException - indicating a non-business-related
exception (such as a communication exception)public void shutdown()
shutdown in interface StorageManagerpublic int getOpenFiles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||