public final class EmptyDataSource extends Object implements ReadableDataSource<Object,Object>
ReadableDataSource based on nothing. getProperty() will always return the same cached
SentinelProperty that doing nothing.
ReadableDataSource.| Modifier and Type | Field and Description |
|---|---|
static ReadableDataSource<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.
|
public static final ReadableDataSource<Object,Object> EMPTY_DATASOURCE
public Object loadConfig() throws Exception
ReadableDataSourceloadConfig in interface ReadableDataSource<Object,Object>Exception - IO or other error occurspublic Object readSource() throws Exception
ReadableDataSourcereadSource in interface ReadableDataSource<Object,Object>Exception - IO or other error occurspublic SentinelProperty<Object> getProperty()
ReadableDataSourceSentinelProperty of the data source.getProperty in interface ReadableDataSource<Object,Object>public void close()
throws Exception
ReadableDataSourceclose in interface ReadableDataSource<Object,Object>Exception - IO or other error occursCopyright © 2019 Alibaba Group. All rights reserved.