public abstract class AbstractDataSource<S,T> extends Object implements DataSource<S,T>
| Modifier and Type | Field and Description |
|---|---|
protected ConfigParser<S,T> |
parser |
protected SentinelProperty<T> |
property |
| Constructor and Description |
|---|
AbstractDataSource(ConfigParser<S,T> parser) |
| Modifier and Type | Method and Description |
|---|---|
SentinelProperty<T> |
getProperty()
Get
SentinelProperty of the data source. |
T |
loadConfig()
Load data data source as the target type.
|
T |
loadConfig(S conf) |
void |
writeDataSource(T values)
Write the
values to the data source. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, readSourceprotected final ConfigParser<S,T> parser
protected final SentinelProperty<T> property
public AbstractDataSource(ConfigParser<S,T> parser)
public T loadConfig() throws Exception
DataSourceloadConfig in interface DataSource<S,T>Exceptionpublic SentinelProperty<T> getProperty()
DataSourceSentinelProperty of the data source.getProperty in interface DataSource<S,T>public void writeDataSource(T values) throws Exception
DataSourcevalues to the data source.writeDataSource in interface DataSource<S,T>ExceptionCopyright © 2018 Alibaba Group. All rights reserved.