< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java

Print this page

485      * Starts a thread in the given ThreadContainer.
486      */
487     void start(Thread thread, ThreadContainer container);
488 
489     /**
490      * Returns the top of the given thread's stackable scope stack.
491      */
492     StackableScope headStackableScope(Thread thread);
493 
494     /**
495      * Sets the top of the current thread's stackable scope stack.
496      */
497     void setHeadStackableScope(StackableScope scope);
498 
499     /**
500      * Returns the Thread object for the current platform thread. If the
501      * current thread is a virtual thread then this method returns the carrier.
502      */
503     Thread currentCarrierThread();
504 












505     /**
506      * Returns the value of the current carrier thread's copy of a thread-local.
507      */
508     <T> T getCarrierThreadLocal(CarrierThreadLocal<T> local);
509 
510     /**
511      * Sets the value of the current carrier thread's copy of a thread-local.
512      */
513     <T> void setCarrierThreadLocal(CarrierThreadLocal<T> local, T value);
514 
515     /**
516      * Removes the value of the current carrier thread's copy of a thread-local.
517      */
518     void removeCarrierThreadLocal(CarrierThreadLocal<?> local);
519 
520     /**
521      * Returns {@code true} if there is a value in the current carrier thread's copy of
522      * thread-local, even if that values is {@code null}.
523      */
524     boolean isCarrierThreadLocalPresent(CarrierThreadLocal<?> local);

485      * Starts a thread in the given ThreadContainer.
486      */
487     void start(Thread thread, ThreadContainer container);
488 
489     /**
490      * Returns the top of the given thread's stackable scope stack.
491      */
492     StackableScope headStackableScope(Thread thread);
493 
494     /**
495      * Sets the top of the current thread's stackable scope stack.
496      */
497     void setHeadStackableScope(StackableScope scope);
498 
499     /**
500      * Returns the Thread object for the current platform thread. If the
501      * current thread is a virtual thread then this method returns the carrier.
502      */
503     Thread currentCarrierThread();
504 
505     /**
506      * Returns the given virtual thread's carrier or {@code null} if not mounted.
507      * @throws UnsupportedOperationException if the thread is not a virtual thread
508      */
509     Thread getCarrierThread(Thread thread);
510 
511     /**
512      * Returns the given virtual thread's internal state.
513      * @throws UnsupportedOperationException if the thread is not a virtual thread
514      */
515     int getInternalState(Thread thread);
516 
517     /**
518      * Returns the value of the current carrier thread's copy of a thread-local.
519      */
520     <T> T getCarrierThreadLocal(CarrierThreadLocal<T> local);
521 
522     /**
523      * Sets the value of the current carrier thread's copy of a thread-local.
524      */
525     <T> void setCarrierThreadLocal(CarrierThreadLocal<T> local, T value);
526 
527     /**
528      * Removes the value of the current carrier thread's copy of a thread-local.
529      */
530     void removeCarrierThreadLocal(CarrierThreadLocal<?> local);
531 
532     /**
533      * Returns {@code true} if there is a value in the current carrier thread's copy of
534      * thread-local, even if that values is {@code null}.
535      */
536     boolean isCarrierThreadLocalPresent(CarrierThreadLocal<?> local);
< prev index next >