public class VolatileCallSite extends CallSite
setTarget(MethodHandle)
occurs in a different thread.
Since VolatileCallSite's target is defined as though it were a volatile variable, there is no need
for a method like MutableCallSite.syncAll(MutableCallSite[]) because every thread will always
see a consistent view of the MethodHandle target.
| Constructor and Description |
|---|
VolatileCallSite(MethodHandle volatileTarget)
Create a VolatileCallSite with the same type as the volatileTarget
and the initial target set to volatileTarget.
|
VolatileCallSite(MethodType type)
Create a VolatileCallSite with the MethodType type and an
initial target that throws IllegalStateException.
|
| Modifier and Type | Method and Description |
|---|---|
MethodHandle |
dynamicInvoker()
Return a MethodHandle equivalent to the invokedynamic instruction on this CallSite.
|
MethodHandle |
getTarget()
The target MethodHandle is returned as though by a read of a volatile variable.
|
void |
setTarget(MethodHandle nextTarget)
Set the CallSite's target to be nextTarget.
|
public VolatileCallSite(MethodHandle volatileTarget) throws NullPointerException
volatileTarget - - the target MethodHandle of the CallSiteNullPointerException - - if the volatileTarget is null.public VolatileCallSite(MethodType type) throws NullPointerException
type - - the permanent type of this CallSite.NullPointerException - - if the type is null.public final MethodHandle dynamicInvoker()
CallSitedynamicInvoker in class CallSitepublic final MethodHandle getTarget()
public void setTarget(MethodHandle nextTarget) throws NullPointerException, WrongMethodTypeException
setTarget in class CallSitenextTarget - - the new target value for the CallSiteNullPointerException - - if nextTarget is null.WrongMethodTypeException - - if the type of nextTarget differs from that of the CallSite.Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2025 IBM Corp. and others.
DRAFT internal-b00