Class SimpleServiceLoader<T>

java.lang.Object
io.nosqlbench.api.spi.SimpleServiceLoader<T>

public class SimpleServiceLoader<T> extends Object
  • Constructor Details

    • SimpleServiceLoader

      public SimpleServiceLoader(Class<? extends T> serviceType, io.nosqlbench.nb.annotations.Maturity maturity)
  • Method Details

    • setMaturity

      public SimpleServiceLoader setMaturity(io.nosqlbench.nb.annotations.Maturity maturity)
    • get

      public Optional<T> get(String implName)
    • getOrThrow

      public T getOrThrow(String implName)
    • getOptionally

      public Optional<T> getOptionally(String implName)
    • getNamedProviders

      public List<SimpleServiceLoader.Component<? extends T>> getNamedProviders(String... includes)
      Load the service providers which are annotated with Service and selector names.
      Parameters:
      includes - If provided, a list of patterns which are used to include named services based on the selector name from the Service annotation.
      Returns:
      A map of providers of T
    • getAllSelectors

      public Map<String,io.nosqlbench.nb.annotations.Maturity> getAllSelectors(String... patterns)