|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StorageManager
Basic interface for a storage manager. The storage manager deals in
terms of TupleBatch objects. The basic contract assumed here is that
batches are requested (#getBatch(TupleSourceID, int)
or removed
(removeBatch(TupleSourceID, int)
) only with the same
beginning row that they were added with. For instance, if batches
from row 1-100 and row 101-200 were added to the storage manager, it
would be fine to get batch with begin row 1 and 101 but getting a batch
with beginning row 50 would fail. This contract was created to minimize
the amount of batch manipulation required by a storage manager.
Field Summary | |
---|---|
static int |
TYPE_DATABASE
Constant for a StorageManager for database storage |
static int |
TYPE_FILE
Constant for a StorageManager for file storage |
static int |
TYPE_MEMORY
Constant for a StorageManager for in-memory storage |
static int |
TYPE_REMOTE
Constant for a StorageManager for remote app storage |
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)
Returns a batch of tuples, starting at row beginRow. |
int |
getStorageType()
Get the type of storage as defined by constants. |
void |
initialize(java.util.Properties props)
Initialize the storage manager given the specified properties. |
void |
removeBatch(TupleSourceID sourceID,
int beginRow)
Remove a batch from this storage as specified. |
void |
removeBatches(TupleSourceID sourceID)
Remove all batches for the specified tuple source. |
void |
shutdown()
Shut down the Storage Manager. |
Field Detail |
---|
static final int TYPE_MEMORY
static final int TYPE_DATABASE
static final int TYPE_FILE
static final int TYPE_REMOTE
Method Detail |
---|
void initialize(java.util.Properties props) throws MetaMatrixComponentException
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)int getStorageType()
TYPE_MEMORY
,
TYPE_DATABASE
,
TYPE_FILE
,
TYPE_REMOTE
void addBatch(TupleSourceID sourceID, TupleBatch batch, java.lang.String[] types) throws MetaMatrixComponentException
types
- 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)TupleBatch getBatch(TupleSourceID sourceID, int beginRow, java.lang.String[] types) throws TupleSourceNotFoundException, MetaMatrixComponentException
types
- 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)void removeBatch(TupleSourceID sourceID, int beginRow) throws TupleSourceNotFoundException, MetaMatrixComponentException
TupleSourceNotFoundException
- indicating the sourceID is unknown
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)void removeBatches(TupleSourceID sourceID) throws MetaMatrixComponentException
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |