Interface AtomicRefresh<T extends LifeCycle<T>>
- Type Parameters:
T- The life cycle type
- All Superinterfaces:
AutoCloseable,Closeable,LifeCycle<T>
- All Known Implementing Classes:
DefaultEnvironment
LifeCycle.refresh() of DefaultEnvironment, which publishes the properties
read by the refresh in one step.
The override lives here, declared against the type variable, and not in
DefaultEnvironment to stay binary compatible. Declared there it would return
Environment, and the compiler would add a bridge method with the erased descriptor of
LifeCycle.refresh(). A subclass compiled against an earlier version that overrides
refresh() and calls super.refresh() is linked against that erased descriptor: it
would reach the bridge, which dispatches back to the subclass, and recurse until the stack
overflows. Declared against the type variable the override has the erased descriptor itself and
there is no bridge.
The interface is public only so that refresh() stays invocable through reflection on
the environment class; it is not meant to be implemented by anything else.
- Since:
- 4.10.32
-
Method Summary
-
Method Details
-
refresh
Description copied from interface:LifeCycleRefreshes the current life cycle object. Effectively this callsLifeCycle.stop()followed byLifeCycle.start().
-