net.floodlightcontroller.storage.memory
Class MemoryStorageSource
java.lang.Object
net.floodlightcontroller.storage.AbstractStorageSource
net.floodlightcontroller.storage.nosql.NoSqlStorageSource
net.floodlightcontroller.storage.memory.MemoryStorageSource
- All Implemented Interfaces:
- IFloodlightModule, IFloodlightService, IStorageSourceService
public class MemoryStorageSource
- extends NoSqlStorageSource
Fields inherited from class net.floodlightcontroller.storage.AbstractStorageSource |
allTableNames, counterStore, DB_ERROR_EXPLANATION, defaultExecutorService, exceptionHandler, executorService, logger, restApi, STORAGE_DELETE_COUNTER_NAME, STORAGE_QUERY_COUNTER_NAME, STORAGE_UPDATE_COUNTER_NAME |
Method Summary |
void |
createTable(java.lang.String tableName,
java.util.Set<java.lang.String> indexedColumnNames)
Create a new table if one does not already exist with the given name. |
protected void |
deleteRowsImpl(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys)
|
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
executeEqualityQuery(java.lang.String tableName,
java.lang.String[] columnNameList,
java.lang.String predicateColumnName,
java.lang.Comparable<?> value)
|
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
executeRangeQuery(java.lang.String tableName,
java.lang.String[] columnNameList,
java.lang.String predicateColumnName,
java.lang.Comparable<?> startValue,
boolean startInclusive,
java.lang.Comparable<?> endValue,
boolean endInclusive)
|
protected java.util.Collection<java.util.Map<java.lang.String,java.lang.Object>> |
getAllRows(java.lang.String tableName,
java.lang.String[] columnNameList)
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getRow(java.lang.String tableName,
java.lang.String[] columnNameList,
java.lang.Object rowKey)
|
java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> |
getServiceImpls()
Instantiate (as needed) and return objects that implement each
of the services exported by this module. |
protected void |
insertRows(java.lang.String tableName,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> insertRowList)
|
void |
setPktinProcessingTime(IPktInProcessingTimeService pktinProcessingTime)
|
void |
startUp(FloodlightModuleContext context)
This is a hook for each module to do its external initializations,
e.g., register for callbacks or query for state in other modules
It is expected that this function will not block and that modules that want
non-event driven CPU will spawn their own threads. |
protected void |
updateRows(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys,
java.util.Map<java.lang.String,java.lang.Object> updateRowList)
|
protected void |
updateRowsImpl(java.lang.String tableName,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> updateRowList)
|
Methods inherited from class net.floodlightcontroller.storage.nosql.NoSqlStorageSource |
createQuery, deleteRowImpl, deleteRowsAndNotify, executeQueryImpl, getColumnIndexMode, getRowImpl, getTablePrimaryKeyName, insertRowImpl, insertRowsAndNotify, sendNotification, sendNotification, setColumnIndexMode, setTablePrimaryKeyName, updateMatchingRowsImpl, updateRowImpl, updateRowImpl, updateRowsAndNotify, updateRowsAndNotify |
Methods inherited from class net.floodlightcontroller.storage.AbstractStorageSource |
addListener, deleteMatchingRows, deleteMatchingRowsAsync, deleteRow, deleteRowAsync, deleteRows, deleteRowsAsync, executeQuery, executeQuery, executeQuery, executeQueryAsync, executeQueryAsync, executeQueryAsync, getAllTableNames, getModuleDependencies, getModuleServices, getRow, getRowAsync, init, insertRow, insertRowAsync, notifyListeners, notifyListeners, removeListener, saveAsync, setCounterStore, setExceptionHandler, setExecutorService, updateCounters, updateMatchingRows, updateMatchingRowsAsync, updateRow, updateRow, updateRowAsync, updateRowAsync, updateRows, updateRowsAsync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryStorageSource
public MemoryStorageSource()
getAllRows
protected java.util.Collection<java.util.Map<java.lang.String,java.lang.Object>> getAllRows(java.lang.String tableName,
java.lang.String[] columnNameList)
- Specified by:
getAllRows
in class NoSqlStorageSource
getRow
protected java.util.Map<java.lang.String,java.lang.Object> getRow(java.lang.String tableName,
java.lang.String[] columnNameList,
java.lang.Object rowKey)
- Specified by:
getRow
in class NoSqlStorageSource
executeEqualityQuery
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>> executeEqualityQuery(java.lang.String tableName,
java.lang.String[] columnNameList,
java.lang.String predicateColumnName,
java.lang.Comparable<?> value)
- Specified by:
executeEqualityQuery
in class NoSqlStorageSource
executeRangeQuery
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>> executeRangeQuery(java.lang.String tableName,
java.lang.String[] columnNameList,
java.lang.String predicateColumnName,
java.lang.Comparable<?> startValue,
boolean startInclusive,
java.lang.Comparable<?> endValue,
boolean endInclusive)
- Specified by:
executeRangeQuery
in class NoSqlStorageSource
insertRows
protected void insertRows(java.lang.String tableName,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> insertRowList)
- Specified by:
insertRows
in class NoSqlStorageSource
updateRows
protected void updateRows(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys,
java.util.Map<java.lang.String,java.lang.Object> updateRowList)
- Specified by:
updateRows
in class NoSqlStorageSource
updateRowsImpl
protected void updateRowsImpl(java.lang.String tableName,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> updateRowList)
- Specified by:
updateRowsImpl
in class AbstractStorageSource
deleteRowsImpl
protected void deleteRowsImpl(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys)
- Specified by:
deleteRowsImpl
in class AbstractStorageSource
createTable
public void createTable(java.lang.String tableName,
java.util.Set<java.lang.String> indexedColumnNames)
- Description copied from interface:
IStorageSourceService
- Create a new table if one does not already exist with the given name.
- Specified by:
createTable
in interface IStorageSourceService
- Overrides:
createTable
in class NoSqlStorageSource
- Parameters:
tableName
- The name of the table to create.indexedColumnNames
- Which columns should be indexed
setPktinProcessingTime
public void setPktinProcessingTime(IPktInProcessingTimeService pktinProcessingTime)
startUp
public void startUp(FloodlightModuleContext context)
- Description copied from interface:
IFloodlightModule
- This is a hook for each module to do its external initializations,
e.g., register for callbacks or query for state in other modules
It is expected that this function will not block and that modules that want
non-event driven CPU will spawn their own threads.
- Specified by:
startUp
in interface IFloodlightModule
- Overrides:
startUp
in class AbstractStorageSource
getServiceImpls
public java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> getServiceImpls()
- Description copied from interface:
IFloodlightModule
- Instantiate (as needed) and return objects that implement each
of the services exported by this module. The map returned maps
the implemented service to the object. The object could be the
same object or different objects for different exported services.
- Specified by:
getServiceImpls
in interface IFloodlightModule
- Overrides:
getServiceImpls
in class AbstractStorageSource
- Returns:
- The map from service interface class to service implementation