Class TapirTaskExecutor


  • @Component("tapirTaskExecutor")
    public class TapirTaskExecutor
    extends java.lang.Object
    The TapirTaskExecutor is responsible for executing Runnables which are registered via submit(CompletionService, Callable). The implementation delegates to the ThreadPoolTaskExecutor. The TapirTaskExecutor is aware of the thread scope and clears is accordingly.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    See Also:
    ThreadPoolTaskExecutor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <V> java.util.concurrent.CompletionService<V> getCompletionService()
      Returns the CompletionService.
      void shutdown()
      This method shuts down the underlying executor.
      <V> java.util.concurrent.Future<V> submit​(java.util.concurrent.CompletionService<V> completionService, java.util.concurrent.Callable<V> callable)
      Executes the given Callable and returns a Future.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TapirTaskExecutor

        public TapirTaskExecutor()
    • Method Detail

      • shutdown

        @PreDestroy
        public void shutdown()
        This method shuts down the underlying executor.
        Since:
        2.0.0
      • getCompletionService

        public <V> java.util.concurrent.CompletionService<V> getCompletionService()
        Returns the CompletionService.
        Type Parameters:
        V - the result type of the completion service
        Returns:
        the completion service
        Since:
        2.0.0
      • submit

        public <V> java.util.concurrent.Future<V> submit​(java.util.concurrent.CompletionService<V> completionService,
                                                         java.util.concurrent.Callable<V> callable)
        Executes the given Callable and returns a Future.
        Type Parameters:
        V - the result type of the given Callable
        Parameters:
        completionService - the completion service
        callable - the callable to be executed
        Returns:
        the future of the execution
        Since:
        2.0.0