16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.internal.access;
27
28 import java.io.InputStream;
29 import java.io.PrintStream;
30 import java.lang.annotation.Annotation;
31 import java.lang.foreign.MemorySegment;
32 import java.lang.foreign.SymbolLookup;
33 import java.lang.invoke.MethodHandle;
34 import java.lang.invoke.MethodType;
35 import java.lang.module.ModuleDescriptor;
36 import java.lang.reflect.Executable;
37 import java.lang.reflect.Method;
38 import java.net.URI;
39 import java.nio.charset.CharacterCodingException;
40 import java.nio.charset.Charset;
41 import java.security.ProtectionDomain;
42 import java.util.List;
43 import java.util.Map;
44 import java.util.Set;
45 import java.util.concurrent.ConcurrentHashMap;
46 import java.util.concurrent.Executor;
47 import java.util.concurrent.RejectedExecutionException;
48 import java.util.stream.Stream;
49
50 import jdk.internal.loader.NativeLibraries;
51 import jdk.internal.misc.CarrierThreadLocal;
52 import jdk.internal.module.ServicesCatalog;
53 import jdk.internal.reflect.ConstantPool;
54 import jdk.internal.vm.Continuation;
55 import jdk.internal.vm.ContinuationScope;
622 /**
623 * Re-enables a virtual thread for scheduling. If the thread was parked then
624 * it will be unblocked, otherwise its next attempt to park will not block
625 * @param thread the virtual thread to unpark
626 * @throws IllegalArgumentException if the thread is not a virtual thread
627 * @throws RejectedExecutionException if the scheduler cannot accept a task
628 */
629 void unparkVirtualThread(Thread thread);
630
631 /**
632 * Returns the virtual thread default scheduler.
633 */
634 Executor virtualThreadDefaultScheduler();
635
636 /**
637 * Creates a new StackWalker
638 */
639 StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
640 ContinuationScope contScope,
641 Continuation continuation);
642 /**
643 * Returns '<loader-name>' @<id> if classloader has a name
644 * explicitly set otherwise <qualified-class-name> @<id>
645 */
646 String getLoaderNameID(ClassLoader loader);
647
648 /**
649 * Copy the string bytes to an existing segment, avoiding intermediate copies.
650 */
651 void copyToSegmentRaw(String string, MemorySegment segment, long offset, int srcIndex, int srcLength);
652
653 /**
654 * Are the string bytes compatible with the given charset?
655 */
656 boolean bytesCompatible(String string, Charset charset, int srcIndex, int numChars);
657
658 /**
659 * Finish initialization of the StackTraceElement objects in a stack trace.
660 */
661 void finishInit(StackTraceElement[] stackTrace);
|
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.internal.access;
27
28 import java.io.InputStream;
29 import java.io.PrintStream;
30 import java.lang.annotation.Annotation;
31 import java.lang.foreign.MemorySegment;
32 import java.lang.foreign.SymbolLookup;
33 import java.lang.invoke.MethodHandle;
34 import java.lang.invoke.MethodType;
35 import java.lang.module.ModuleDescriptor;
36 import java.lang.reflect.ClassFileFormatVersion;
37 import java.lang.reflect.Executable;
38 import java.lang.reflect.Method;
39 import java.net.URI;
40 import java.nio.charset.CharacterCodingException;
41 import java.nio.charset.Charset;
42 import java.security.ProtectionDomain;
43 import java.util.List;
44 import java.util.Map;
45 import java.util.Set;
46 import java.util.concurrent.ConcurrentHashMap;
47 import java.util.concurrent.Executor;
48 import java.util.concurrent.RejectedExecutionException;
49 import java.util.stream.Stream;
50
51 import jdk.internal.loader.NativeLibraries;
52 import jdk.internal.misc.CarrierThreadLocal;
53 import jdk.internal.module.ServicesCatalog;
54 import jdk.internal.reflect.ConstantPool;
55 import jdk.internal.vm.Continuation;
56 import jdk.internal.vm.ContinuationScope;
623 /**
624 * Re-enables a virtual thread for scheduling. If the thread was parked then
625 * it will be unblocked, otherwise its next attempt to park will not block
626 * @param thread the virtual thread to unpark
627 * @throws IllegalArgumentException if the thread is not a virtual thread
628 * @throws RejectedExecutionException if the scheduler cannot accept a task
629 */
630 void unparkVirtualThread(Thread thread);
631
632 /**
633 * Returns the virtual thread default scheduler.
634 */
635 Executor virtualThreadDefaultScheduler();
636
637 /**
638 * Creates a new StackWalker
639 */
640 StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
641 ContinuationScope contScope,
642 Continuation continuation);
643
644 /**
645 * Returns the class file format version of the class.
646 */
647 int classFileFormatVersion(Class<?> klass);
648
649 /**
650 * Returns '<loader-name>' @<id> if classloader has a name
651 * explicitly set otherwise <qualified-class-name> @<id>
652 */
653 String getLoaderNameID(ClassLoader loader);
654
655 /**
656 * Copy the string bytes to an existing segment, avoiding intermediate copies.
657 */
658 void copyToSegmentRaw(String string, MemorySegment segment, long offset, int srcIndex, int srcLength);
659
660 /**
661 * Are the string bytes compatible with the given charset?
662 */
663 boolean bytesCompatible(String string, Charset charset, int srcIndex, int numChars);
664
665 /**
666 * Finish initialization of the StackTraceElement objects in a stack trace.
667 */
668 void finishInit(StackTraceElement[] stackTrace);
|