类 NacosServiceLoader

java.lang.Object
com.alibaba.nacos.common.spi.NacosServiceLoader

public class NacosServiceLoader extends Object
Nacos SPI Service Loader.
作者:
xiweng.yy
  • 构造器详细资料

    • NacosServiceLoader

      public NacosServiceLoader()
  • 方法详细资料

    • load

      public static <T> Collection<T> load(Class<T> service)
      Load service.

      Load service by SPI and cache the classes for reducing cost when load second time.

      类型参数:
      T - type of service
      参数:
      service - service class
      返回:
      service instances
    • newServiceInstances

      public static <T> Collection<T> newServiceInstances(Class<T> service)
      New service instances.
      类型参数:
      T - type of service
      参数:
      service - service class
      返回:
      service instances