public class EmptyDataSource extends Object implements DataSource<Object,Object>
DataSource based on nothing. getProperty() will always return the same cached
SentinelProperty that doing nothing.
DataSource| Modifier and Type | Field and Description |
|---|---|
static DataSource<Object,Object> |
EMPTY_DATASOURCE |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the data source.
|
SentinelProperty<Object> |
getProperty()
Get
SentinelProperty of the data source. |
Object |
loadConfig()
Load data data source as the target type.
|
Object |
readSource()
Read original data from the data source.
|
void |
writeDataSource(Object config)
Write the
values to the data source. |
public static final DataSource<Object,Object> EMPTY_DATASOURCE
public Object loadConfig() throws Exception
DataSourceloadConfig in interface DataSource<Object,Object>Exceptionpublic Object readSource() throws Exception
DataSourcereadSource in interface DataSource<Object,Object>Exceptionpublic SentinelProperty<Object> getProperty()
DataSourceSentinelProperty of the data source.getProperty in interface DataSource<Object,Object>public void close()
throws Exception
DataSourceclose in interface DataSource<Object,Object>Exceptionpublic void writeDataSource(Object config) throws Exception
DataSourcevalues to the data source.writeDataSource in interface DataSource<Object,Object>ExceptionCopyright © 2018 Alibaba Group. All rights reserved.