Class LoomSupport
java.lang.Object
io.micronaut.scheduling.LoomSupport
@Internal
@NullUnmarked
@Deprecated(since="5.2.1",
forRemoval=true)
public final class LoomSupport
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Virtual thread support from before virtual threads were part of every Java version Micronaut runs on.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.Virtual threads are always supported, to be removed, see #13119. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated, for removal: This API element is subject to removal in a future version.Does nothing, virtual threads are always supported.static booleanDeprecated, for removal: This API element is subject to removal in a future version.static booleanDeprecated, for removal: This API element is subject to removal in a future version.static ExecutorServicenewThreadPerTaskExecutor(ThreadFactory threadFactory) Deprecated, for removal: This API element is subject to removal in a future version.static ThreadFactorynewVirtualThreadFactory(String namePrefix) Deprecated, for removal: This API element is subject to removal in a future version.static ThreadFactorynewVirtualThreadFactory(String namePrefix, Consumer<Object> builderModifier) Deprecated, for removal: This API element is subject to removal in a future version.static ThreadDeprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
isSupported
public static boolean isSupported()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- Always true
-
checkSupported
public static void checkSupported()Deprecated, for removal: This API element is subject to removal in a future version.Does nothing, virtual threads are always supported. -
newVirtualThreadFactory
public static ThreadFactory newVirtualThreadFactory(String namePrefix, Consumer<Object> builderModifier) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
namePrefix- The thread name prefix, followed by a counter starting at 1builderModifier- Modifies theThread.Builder.OfVirtual, may be null- Returns:
- A factory of virtual threads
-
unstarted
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
name- The thread namebuilderModifier- Modifies theThread.Builder.OfVirtual, may be nulltask- The task- Returns:
- An unstarted virtual thread
-
newThreadPerTaskExecutor
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
threadFactory- The thread factory- Returns:
- An executor starting a thread per task
-
newVirtualThreadFactory
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
namePrefix- The thread name prefix, followed by a counter starting at 1- Returns:
- A factory of virtual threads
-
isVirtual
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
thread- The thread- Returns:
- Whether the thread is virtual
-
Thread.ofVirtual(),Executors.newThreadPerTaskExecutor(ThreadFactory)andThread.isVirtual()directly. To be removed, see #13119.