public class PersistenceManagerImpl extends Object implements IPersistenceManager
Default implementation of the persistence manager.
Modifier and Type | Field and Description |
---|---|
protected String |
basePath |
protected ModuleRegistry |
moduleRegistry |
Constructor and Description |
---|
PersistenceManagerImpl(ModuleRegistry moduleRegistry,
String basePath) |
Modifier and Type | Method and Description |
---|---|
List<IRecordStorageModule<?>> |
findStorageForSensor(String sensorLocalID)
Finds storage modules where the specified sensor data is archived
|
List<ModuleConfig> |
getAvailableModules()
Gets the list of all modules handled by this manager
that are configured but not yet loaded (i.e.
|
StorageConfig |
getDefaultStorageConfig(Class<?> storageClass)
Gets the default config for the specified storage type
|
List<IStorageModule<?>> |
getLoadedModules()
Gets the list of all modules handled by this manager
that are already loaded (i.e.
|
IStorageModule<?> |
getModuleById(String moduleID)
Retrieves a module instance by its local ID
|
boolean |
isModuleLoaded(String moduleID) |
protected ModuleRegistry moduleRegistry
protected String basePath
public PersistenceManagerImpl(ModuleRegistry moduleRegistry, String basePath)
public List<IStorageModule<?>> getLoadedModules()
IModuleManager
getLoadedModules
in interface IModuleManager<IStorageModule<?>>
public boolean isModuleLoaded(String moduleID)
isModuleLoaded
in interface IModuleManager<IStorageModule<?>>
moduleID
- local ID of modulepublic List<ModuleConfig> getAvailableModules()
IModuleManager
getAvailableModules
in interface IModuleManager<IStorageModule<?>>
public IStorageModule<?> getModuleById(String moduleID) throws SensorHubException
IModuleManager
getModuleById
in interface IModuleManager<IStorageModule<?>>
moduleID
- Id of module to retrieveSensorHubException
public List<IRecordStorageModule<?>> findStorageForSensor(String sensorLocalID) throws SensorHubException
IPersistenceManager
findStorageForSensor
in interface IPersistenceManager
sensorLocalID
- Local ID of sensor to find existing storage forSensorHubException
public StorageConfig getDefaultStorageConfig(Class<?> storageClass) throws SensorHubException
IPersistenceManager
getDefaultStorageConfig
in interface IPersistenceManager
storageClass
- Concrete storage classSensorHubException
Copyright © 2015 Sensia Software LLC. All rights reserved.