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;
586 /**
587 * Re-enables a virtual thread for scheduling. If the thread was parked then
588 * it will be unblocked, otherwise its next attempt to park will not block
589 * @param thread the virtual thread to unpark
590 * @throws IllegalArgumentException if the thread is not a virtual thread
591 * @throws RejectedExecutionException if the scheduler cannot accept a task
592 */
593 void unparkVirtualThread(Thread thread);
594
595 /**
596 * Returns the virtual thread default scheduler.
597 */
598 Executor virtualThreadDefaultScheduler();
599
600 /**
601 * Creates a new StackWalker
602 */
603 StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
604 ContinuationScope contScope,
605 Continuation continuation);
606 /**
607 * Returns '<loader-name>' @<id> if classloader has a name
608 * explicitly set otherwise <qualified-class-name> @<id>
609 */
610 String getLoaderNameID(ClassLoader loader);
611
612 /**
613 * Copy the string bytes to an existing segment, avoiding intermediate copies.
614 */
615 void copyToSegmentRaw(String string, MemorySegment segment, long offset);
616
617 /**
618 * Are the string bytes compatible with the given charset?
619 */
620 boolean bytesCompatible(String string, Charset charset);
621 }
|
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;
587 /**
588 * Re-enables a virtual thread for scheduling. If the thread was parked then
589 * it will be unblocked, otherwise its next attempt to park will not block
590 * @param thread the virtual thread to unpark
591 * @throws IllegalArgumentException if the thread is not a virtual thread
592 * @throws RejectedExecutionException if the scheduler cannot accept a task
593 */
594 void unparkVirtualThread(Thread thread);
595
596 /**
597 * Returns the virtual thread default scheduler.
598 */
599 Executor virtualThreadDefaultScheduler();
600
601 /**
602 * Creates a new StackWalker
603 */
604 StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
605 ContinuationScope contScope,
606 Continuation continuation);
607
608 /**
609 * Returns the class file format version of the class.
610 */
611 int classFileFormatVersion(Class<?> klass);
612
613 /**
614 * Returns '<loader-name>' @<id> if classloader has a name
615 * explicitly set otherwise <qualified-class-name> @<id>
616 */
617 String getLoaderNameID(ClassLoader loader);
618
619 /**
620 * Copy the string bytes to an existing segment, avoiding intermediate copies.
621 */
622 void copyToSegmentRaw(String string, MemorySegment segment, long offset);
623
624 /**
625 * Are the string bytes compatible with the given charset?
626 */
627 boolean bytesCompatible(String string, Charset charset);
628 }
|