Class InMemoryDataSourceRepository
java.lang.Object
org.apache.synapse.commons.datasource.InMemoryDataSourceRepository
- All Implemented Interfaces:
DataSourceRepository
Keeps all DataSources in the memory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear already registered datasourcesvoidinit(Properties properties) Initialization with given propertiesbooleanExplicitly check for initGet a DataSource from Local storevoidregister(DataSourceInformation dataSourceInformation) Keep DataSource in the Local store.voidunRegister(String name) Removing datasource
-
Constructor Details
-
InMemoryDataSourceRepository
public InMemoryDataSourceRepository()
-
-
Method Details
-
register
Keep DataSource in the Local store.- Specified by:
registerin interfaceDataSourceRepository- Parameters:
dataSourceInformation- the information describing a data source- See Also:
-
unRegister
Description copied from interface:DataSourceRepositoryRemoving datasource- Specified by:
unRegisterin interfaceDataSourceRepository- Parameters:
name- name of the datasource to be removed
-
lookUp
Get a DataSource from Local store- Specified by:
lookUpin interfaceDataSourceRepository- Parameters:
name- Name of the DataSource to be looked up- Returns:
- DataSource Instance
- See Also:
-
init
Description copied from interface:DataSourceRepositoryInitialization with given properties- Specified by:
initin interfaceDataSourceRepository- Parameters:
properties- configuration properties
-
isInitialized
public boolean isInitialized()Description copied from interface:DataSourceRepositoryExplicitly check for init- Specified by:
isInitializedin interfaceDataSourceRepository- Returns:
- True , if has already initialized
-
clear
public void clear()Description copied from interface:DataSourceRepositoryClear already registered datasources- Specified by:
clearin interfaceDataSourceRepository
-