- Alle bekannten Implementierungsklassen:
DefaultExecutorProvider
- Funktionsschnittstelle:
- Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.
The
ExecutorProvider
SPI can be used to provide jOOQ with custom
asynchronous execution behaviour.
Asynchronous operations will call back to this SPI to obtain an executor.
This applies, for example, to ResultQuery.fetchAsync()
.
The following logic is applied when resolving the appropriate
executor
:
- If
Configuration.executorProvider()
does not returnnull
, thenprovide()
is called to obtain anExecutor
for the asynchronous task. - In the jOOQ Java 8 distribution,
ForkJoinPool.commonPool()
is used ifForkJoinPool.getCommonPoolParallelism()
> 1 - A new "one thread per call"
Executor
is used in any other case.
The SPI will not be called if an asynchronous operation explicitly overrides
the Executor
, e.g. as is the case for
ResultQuery.fetchAsync(Executor)
.
- Autor:
- Lukas Eder
-
Methodenübersicht
-
Methodendetails
-
provide
Provide anExecutor
for the task at hand.
-