Class VirtualThreadSupport$


  • public class VirtualThreadSupport$
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static VirtualThreadSupport$ MODULE$
      Static reference to the singleton instance of this Scala object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.ForkJoinPool getVirtualThreadDefaultScheduler()
      Try to get the default scheduler of virtual thread.
      boolean isSupported()
      Is virtual thread supported
      java.util.concurrent.ExecutorService newThreadPerTaskExecutor​(java.util.concurrent.ThreadFactory threadFactory)
      Create a newThreadPerTaskExecutor with the specified thread factory.
      java.util.concurrent.ThreadFactory newVirtualThreadFactory​(java.lang.String prefix)
      Create a virtual thread factory with the default Virtual Thread executor.
      java.util.concurrent.ThreadFactory newVirtualThreadFactory​(java.lang.String prefix, java.util.concurrent.ExecutorService executor)
      Create a virtual thread factory with the specified executor as the scheduler of virtual thread.
      • Methods inherited from class java.lang.Object

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

      • MODULE$

        public static final VirtualThreadSupport$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • VirtualThreadSupport$

        public VirtualThreadSupport$()
    • Method Detail

      • isSupported

        public boolean isSupported()
        Is virtual thread supported
      • newThreadPerTaskExecutor

        public java.util.concurrent.ExecutorService newThreadPerTaskExecutor​(java.util.concurrent.ThreadFactory threadFactory)
        Create a newThreadPerTaskExecutor with the specified thread factory.
      • newVirtualThreadFactory

        public java.util.concurrent.ThreadFactory newVirtualThreadFactory​(java.lang.String prefix)
        Create a virtual thread factory with the default Virtual Thread executor.
      • newVirtualThreadFactory

        public java.util.concurrent.ThreadFactory newVirtualThreadFactory​(java.lang.String prefix,
                                                                          java.util.concurrent.ExecutorService executor)
        Create a virtual thread factory with the specified executor as the scheduler of virtual thread.
      • getVirtualThreadDefaultScheduler

        public java.util.concurrent.ForkJoinPool getVirtualThreadDefaultScheduler()
        Try to get the default scheduler of virtual thread.