diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java index 99f22d71a09c..a16649aa1678 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java @@ -537,4 +537,22 @@ protected void initiateEarlyShutdown() { initiateShutdown(); } + /** + * Whether this executor is using virtual threads. + * @return {@code true} if using virtual threads + * @since 6.2.1 + */ + public boolean isVirtualThreads() { + return this.virtualThreads; + } + + /** + * Executor beanName. + * @return the executor beanName + * @since 6.2.1 + */ + @Nullable + public String getBeanName() { + return this.beanName; + } }