SwitchPoint
Class SwitchPoint
- java.lang.Object
-
- java.lang.invoke.SwitchPoint
public class SwitchPoint extends Object
A SwitchPoint
is an object which can publish state transitions to other threads. A switch point is initially in the valid state, but may at any time be changed to the invalid state. Invalidation cannot be reversed. A switch point can combine a guarded pair of method handles into a guarded delegator. The guarded delegator is a method handle which delegates to one of the old method handles. The state of the switch point determines which of the two gets the delegation.
A single switch point may be used to control any number of method handles. (Indirectly, therefore, it can control any number of call sites.) This is