|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BufferManager
The buffer manager controls how memory is used and how data flows through
the system. It uses storage managers
to retrieve data, store data, and
transfer data. The buffer manager has algorithms that tell it when and
how to store data. The buffer manager should also be aware of memory
management issues.
Nested Class Summary | |
---|---|
static class |
BufferManager.TupleSourceStatus
|
static class |
BufferManager.TupleSourceType
|
Method Summary | |
---|---|
void |
addStreamablePart(TupleSourceID tupleSourceID,
LobChunk streamGlob,
int beginRow)
Add a streamable object to the persistent store. |
void |
addTupleBatch(TupleSourceID tupleSourceID,
TupleBatch tupleBatch)
Adds a batch of tuples for the specified tuple source |
TupleSourceID |
createTupleSource(java.util.List elements,
java.lang.String[] types,
java.lang.String groupName,
BufferManager.TupleSourceType tupleSourceType)
Creates a tuple source based on a schema and properties describing hints about the source |
int |
getConnectorBatchSize()
Get the batch size to use when reading data from a connector. |
int |
getFinalRowCount(TupleSourceID tupleSourceID)
Gets the final row count if tuple source is FULL, otherwise returns -1. |
int |
getProcessorBatchSize()
Get the batch size to use during query processing. |
int |
getRowCount(TupleSourceID tupleSourceID)
Gets the current row count |
BufferManager.TupleSourceStatus |
getStatus(TupleSourceID tupleSourceID)
Gets the status of the tuple source |
Streamable<?> |
getStreamable(TupleSourceID id,
java.lang.String referenceId)
Return the LOB associated with the referenceId |
LobChunk |
getStreamablePart(TupleSourceID tupleSourceID,
int beginRow)
Returns the streamable batch object's part stored with specified identifier |
java.util.List |
getTupleSchema(TupleSourceID tupleSourceID)
Gets a tuple source schema by ID |
IndexedTupleSource |
getTupleSource(TupleSourceID tupleSourceID)
Gets a tuple source by ID |
void |
initialize(java.lang.String location,
java.util.Properties properties)
Prompts this implementation to initialize itself with the supplied Properties. |
TupleBatch |
pinTupleBatch(TupleSourceID tupleSourceID,
int beginRow)
Gets a tuple batch by ID and indexes. |
void |
releasePinnedBatches()
Release batches that have been pinned by this thread. |
void |
removeTupleSource(TupleSourceID tupleSourceID)
Removes a tuple source by ID |
void |
removeTupleSources(java.lang.String groupName)
Removes all tuple sources by group name |
void |
setPersistentTupleSource(TupleSourceID id,
Streamable<? extends java.lang.Object> s)
Assign the TupleSource as the persistent stream for the Streamable |
void |
setStatus(TupleSourceID tupleSourceID,
BufferManager.TupleSourceStatus status)
Sets the status of the tuple source |
void |
setStorageManager(StorageManager storageManager)
Adds a StorageManager to this BufferManager instance. |
void |
stop()
|
void |
unpinTupleBatch(TupleSourceID tupleSourceID,
int firstRow)
Unpins a range of rows from the given tuple source |
Method Detail |
---|
void initialize(java.lang.String location, java.util.Properties properties) throws MetaMatrixComponentException
lookup
- Class used to determine identity and lookup other managersproperties
- Properties required to initialize the Buffer Manager
BufferException
- if there was a problem initializing
MetaMatrixComponentException
int getProcessorBatchSize()
int getConnectorBatchSize()
void setStorageManager(StorageManager storageManager)
StorageManager
to this BufferManager instance.
storageManager
- Storage manager to addTupleSourceID createTupleSource(java.util.List elements, java.lang.String[] types, java.lang.String groupName, BufferManager.TupleSourceType tupleSourceType) throws MetaMatrixComponentException
elements
- Elements of the tuple sourcegroupName
- Tuple source group nametupleSourceType
- Type of tuple source
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)void removeTupleSource(TupleSourceID tupleSourceID) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifier
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)void removeTupleSources(java.lang.String groupName) throws MetaMatrixComponentException
groupName
- Tuple source group name
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)IndexedTupleSource getTupleSource(TupleSourceID tupleSourceID) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifier
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)TupleBatch pinTupleBatch(TupleSourceID tupleSourceID, int beginRow) throws TupleSourceNotFoundException, MemoryNotAvailableException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifierbeginRow
- First row index to return
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)
MemoryNotAvailableException
- If memory was not available for the pinvoid unpinTupleBatch(TupleSourceID tupleSourceID, int firstRow) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifierfirstRow
- First row to unpin
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)java.util.List getTupleSchema(TupleSourceID tupleSourceID) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifier
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)void addTupleBatch(TupleSourceID tupleSourceID, TupleBatch tupleBatch) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifiertupleBatch
- Batch of rows to add
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)int getRowCount(TupleSourceID tupleSourceID) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifier
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)void setStatus(TupleSourceID tupleSourceID, BufferManager.TupleSourceStatus status) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifierstatus
- New status
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)BufferManager.TupleSourceStatus.ACTIVE
,
BufferManager.TupleSourceStatus.FULL
BufferManager.TupleSourceStatus getStatus(TupleSourceID tupleSourceID) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifier
TupleSourceNotFoundException
- if tuple source could not be found
MetaMatrixComponentException
- indicating a non-business-related
exception (such as a communication exception)BufferManager.TupleSourceStatus.ACTIVE
,
BufferManager.TupleSourceStatus.FULL
int getFinalRowCount(TupleSourceID tupleSourceID) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- Tuple source identifier
TupleSourceNotFoundException
MetaMatrixComponentException
void addStreamablePart(TupleSourceID tupleSourceID, LobChunk streamGlob, int beginRow) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- streamGlob
- part of the streamstream
-
TupleSourceNotFoundException
MetaMatrixComponentException
LobChunk getStreamablePart(TupleSourceID tupleSourceID, int beginRow) throws TupleSourceNotFoundException, MetaMatrixComponentException
tupleSourceID
- - identifier
TupleSourceNotFoundException
MetaMatrixComponentException
void stop()
void releasePinnedBatches() throws MetaMatrixComponentException
MetaMatrixComponentException
Streamable<?> getStreamable(TupleSourceID id, java.lang.String referenceId) throws TupleSourceNotFoundException, MetaMatrixComponentException
id
- referenceId
-
TupleSourceNotFoundException
MetaMatrixComponentException
void setPersistentTupleSource(TupleSourceID id, Streamable<? extends java.lang.Object> s) throws TupleSourceNotFoundException
TupleSource
as the persistent stream for the Streamable
id
- s
-
TupleSourceNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |