< prev index next >

src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedThread.java

Print this page
*** 24,10 ***
--- 24,11 ---
   */
  
  package jdk.jfr.consumer;
  
  import jdk.jfr.internal.consumer.ObjectContext;
+ import jdk.internal.javac.PreviewFeature;
  
  /**
   * A recorded thread.
   *
   * @since 9

*** 101,6 ***
--- 102,17 ---
       * @return a unique ID for the thread
       */
      public long getId() {
          return uniqueId;
      }
+ 
+     /**
+      * {@return {@code true} if this is a virtual Thread, {@code false} otherwise}
+      *
+      * @since 99
+      */
+     @PreviewFeature(feature = PreviewFeature.Feature.VIRTUAL_THREADS)
+     public boolean isVirtual() {
+         return getTyped("isVirtual", Boolean.class, Boolean.FALSE);
+     }
+ 
  }
< prev index next >