com.metamatrix.common.buffer.storage.memory
Class MemoryStorageManager

java.lang.Object
  extended by com.metamatrix.common.buffer.storage.memory.MemoryStorageManager
All Implemented Interfaces:
StorageManager

public class MemoryStorageManager
extends java.lang.Object
implements StorageManager


Field Summary
 
Fields inherited from interface com.metamatrix.common.buffer.StorageManager
TYPE_DATABASE, TYPE_FILE, TYPE_MEMORY, TYPE_REMOTE
 
Constructor Summary
MemoryStorageManager()
           
 
Method Summary
 void addBatch(TupleSourceID storageID, TupleBatch batch, java.lang.String[] types)
          Add a batch to the storage manager.
 TupleBatch getBatch(TupleSourceID storageID, 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 storageID)
          Remove all batches for the specified tuple source.
 void shutdown()
          Shut down the Storage Manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryStorageManager

public MemoryStorageManager()
Method Detail

initialize

public void initialize(java.util.Properties props)
                throws MetaMatrixComponentException
Description copied from interface: StorageManager
Initialize the storage manager given the specified properties. Properties are typically specific to the particular storage manager.

Specified by:
initialize in interface StorageManager
Throws:
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
See Also:
StorageManager.initialize(Properties)

getStorageType

public int getStorageType()
Description copied from interface: StorageManager
Get the type of storage as defined by constants.

Specified by:
getStorageType in interface StorageManager
Returns:
Storage type
See Also:
StorageManager.getStorageType()

addBatch

public void addBatch(TupleSourceID storageID,
                     TupleBatch batch,
                     java.lang.String[] types)
              throws MetaMatrixComponentException
Description copied from interface: StorageManager
Add a batch to the storage manager.

Specified by:
addBatch in interface StorageManager
types - a hint to the StorageManager about the types of data in the batch
Throws:
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
See Also:
StorageManager#addBatch(TupleSourceID, TupleBatch)

getBatch

public TupleBatch getBatch(TupleSourceID storageID,
                           int beginRow,
                           java.lang.String[] types)
                    throws TupleSourceNotFoundException,
                           MetaMatrixComponentException
Description copied from interface: StorageManager
Returns a batch of tuples, starting at row beginRow. The batch will only be found if the batch that was added begins at beginRow.

Specified by:
getBatch in interface StorageManager
types - a hint to the StorageManager about the types of data in the batch
Returns:
batch of tuples starting at row beginRow
Throws:
TupleSourceNotFoundException - indicating the sourceID is unknown
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
See Also:
StorageManager#getBatch(TupleSourceID, int, int)

removeBatch

public void removeBatch(TupleSourceID sourceID,
                        int beginRow)
                 throws TupleSourceNotFoundException,
                        MetaMatrixComponentException
Description copied from interface: StorageManager
Remove a batch from this storage as specified. If the tuple source is unknown or the batch is unknown, a TupleSourceNotFoundException is thrown.

Specified by:
removeBatch in interface StorageManager
Throws:
TupleSourceNotFoundException - indicating the sourceID is unknown
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
See Also:
com.metamatrix.common.buffer.StorageManager#removeBatch(TupleSourceID, int, int)

removeBatches

public void removeBatches(TupleSourceID storageID)
                   throws MetaMatrixComponentException
Description copied from interface: StorageManager
Remove all batches for the specified tuple source. If no batches exist, no exception is thrown.

Specified by:
removeBatches in interface StorageManager
Throws:
MetaMatrixComponentException - indicating a non-business-related exception (such as a communication exception)
See Also:
StorageManager#removeStorageArea(TupleSourceID)

shutdown

public void shutdown()
Description copied from interface: StorageManager
Shut down the Storage Manager.

Specified by:
shutdown in interface StorageManager
See Also:
StorageManager.shutdown()


Copyright © 2009. All Rights Reserved.