Interface ExecutorSelector

  • All Known Implementing Classes:
    DefaultExecutorSelector

    public interface ExecutorSelector
    Interface that allows customizing the selection of the ExecutorService to run an operation on.
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<java.util.concurrent.ExecutorService> select​(io.micronaut.inject.MethodReference method, ThreadSelection threadSelection)
      Select an ExecutorService for the given MethodReference.
      java.util.Optional<java.util.concurrent.ExecutorService> select​(java.lang.String name)
      Obtain executor for the given name.
    • Method Detail

      • select

        java.util.Optional<java.util.concurrent.ExecutorService> select​(io.micronaut.inject.MethodReference method,
                                                                        ThreadSelection threadSelection)
        Select an ExecutorService for the given MethodReference.
        Parameters:
        method - The MethodReference
        threadSelection - The thread selection mode
        Returns:
        An optional ExecutorService. If an ExecutorService cannot be established Optional.empty() is returned
      • select

        java.util.Optional<java.util.concurrent.ExecutorService> select​(java.lang.String name)
        Obtain executor for the given name.
        Parameters:
        name - The name of the executor
        Returns:
        An executor if it exists
        Since:
        3.1.0