Module java.base

Class VolatileCallSite

java.lang.Object
java.lang.invoke.CallSite
java.lang.invoke.VolatileCallSite

public non-sealed class VolatileCallSite extends CallSite
A VolatileCallSite is a CallSite whose target acts like a volatile variable. An invokedynamic instruction linked to a VolatileCallSite sees updates to its call site target immediately, even if the update occurs in another thread. There may be a performance penalty for such tight coupling between threads.

Unlike MutableCallSite, there is no syncAll operation on volatile call sites, since every write to a volatile variable is implicitly synchronized with reader threads.

In other respects, a VolatileCallSite is interchangeable with MutableCallSite.

Since:
1.7
See Also: