接口 Selector<R,C,E>

所有超级接口:
Serializable
所有已知实现类:
AbstractCmdbSelector, AbstractSelector, ExpressionSelector, NoneSelector

public interface Selector<R,C,E> extends Serializable
The Selector mainly work on the logic of parse and select. parse(Object) allow user accept the condition which provided by Nacos to build the select(Object) judge logic. select(Object) allow user to execute the logic to get the target result they want. getType() will return the type. getContextType() will return the context type which used by select(Object).

Now, Nacos only provide the AbstractCmdbSelector for user to implement their own select logic. Other type is waiting.

作者:
chenglu
  • 方法详细资料

    • parse

      Selector<R,C,E> parse(E expression) throws NacosException
      parse the selector, build the inner info which used by select(Object).
      参数:
      expression - expression.
      返回:
      selector.
      抛出:
      NacosException - parse failed exception.
    • select

      R select(C context)
      select the target result.
      参数:
      context - selector context.
      返回:
      select result.
    • getType

      String getType()
      Get the selector type.
      返回:
      selector type.
    • getContextType

      String getContextType()
      Get the select context which used by select(Object).
      返回:
      selector context type.