接口 ReadableDataSource<S,T>

类型参数:
S - source data type
T - target data type
所有已知实现类:
AbstractDataSource, AutoRefreshDataSource, EmptyDataSource, FileInJarReadableDataSource, FileRefreshableDataSource

public interface ReadableDataSource<S,T>
The readable data source is responsible for retrieving configs (read-only).
作者:
leyou, Eric Zhao
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Close the data source.
    com.alibaba.csp.sentinel.property.SentinelProperty<T>
    Get SentinelProperty of the data source.
    Load data data source as the target type.
    Read original data from the data source.
  • 方法详细资料

    • loadConfig

      T loadConfig() throws Exception
      Load data data source as the target type.
      返回:
      the target data.
      抛出:
      Exception - IO or other error occurs
    • readSource

      S readSource() throws Exception
      Read original data from the data source.
      返回:
      the original data.
      抛出:
      Exception - IO or other error occurs
    • getProperty

      com.alibaba.csp.sentinel.property.SentinelProperty<T> getProperty()
      Get SentinelProperty of the data source.
      返回:
      the property.
    • close

      void close() throws Exception
      Close the data source.
      抛出:
      Exception - IO or other error occurs