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.AccessControlContext;
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;
601 /**
602 * Re-enables a virtual thread for scheduling. If the thread was parked then
603 * it will be unblocked, otherwise its next attempt to park will not block
604 * @param thread the virtual thread to unpark
605 * @throws IllegalArgumentException if the thread is not a virtual thread
606 * @throws RejectedExecutionException if the scheduler cannot accept a task
607 */
608 void unparkVirtualThread(Thread thread);
609
610 /**
611 * Returns the virtual thread default scheduler.
612 */
613 Executor virtualThreadDefaultScheduler();
614
615 /**
616 * Creates a new StackWalker
617 */
618 StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
619 ContinuationScope contScope,
620 Continuation continuation);
621 /**
622 * Returns '<loader-name>' @<id> if classloader has a name
623 * explicitly set otherwise <qualified-class-name> @<id>
624 */
625 String getLoaderNameID(ClassLoader loader);
626
627 /**
628 * Copy the string bytes to an existing segment, avoiding intermediate copies.
629 */
630 void copyToSegmentRaw(String string, MemorySegment segment, long offset);
631
632 /**
633 * Are the string bytes compatible with the given charset?
634 */
635 boolean bytesCompatible(String string, Charset charset);
636
637 /**
638 * Is a security manager already set or allowed to be set
639 * (using -Djava.security.manager=allow)?
640 */
|
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.AccessControlContext;
43 import java.security.ProtectionDomain;
44 import java.util.List;
45 import java.util.Map;
46 import java.util.Set;
47 import java.util.concurrent.ConcurrentHashMap;
48 import java.util.concurrent.Executor;
49 import java.util.concurrent.RejectedExecutionException;
50 import java.util.stream.Stream;
51
52 import jdk.internal.loader.NativeLibraries;
53 import jdk.internal.misc.CarrierThreadLocal;
54 import jdk.internal.module.ServicesCatalog;
55 import jdk.internal.reflect.ConstantPool;
56 import jdk.internal.vm.Continuation;
602 /**
603 * Re-enables a virtual thread for scheduling. If the thread was parked then
604 * it will be unblocked, otherwise its next attempt to park will not block
605 * @param thread the virtual thread to unpark
606 * @throws IllegalArgumentException if the thread is not a virtual thread
607 * @throws RejectedExecutionException if the scheduler cannot accept a task
608 */
609 void unparkVirtualThread(Thread thread);
610
611 /**
612 * Returns the virtual thread default scheduler.
613 */
614 Executor virtualThreadDefaultScheduler();
615
616 /**
617 * Creates a new StackWalker
618 */
619 StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
620 ContinuationScope contScope,
621 Continuation continuation);
622
623 /**
624 * Returns the class file format version of the class.
625 */
626 int classFileFormatVersion(Class<?> klass);
627
628 /**
629 * Returns '<loader-name>' @<id> if classloader has a name
630 * explicitly set otherwise <qualified-class-name> @<id>
631 */
632 String getLoaderNameID(ClassLoader loader);
633
634 /**
635 * Copy the string bytes to an existing segment, avoiding intermediate copies.
636 */
637 void copyToSegmentRaw(String string, MemorySegment segment, long offset);
638
639 /**
640 * Are the string bytes compatible with the given charset?
641 */
642 boolean bytesCompatible(String string, Charset charset);
643
644 /**
645 * Is a security manager already set or allowed to be set
646 * (using -Djava.security.manager=allow)?
647 */
|