Interface HotSwappableInterceptedProxy<T>

  • Type Parameters:
    T - The declaring type
    All Superinterfaces:
    Intercepted, io.micronaut.inject.proxy.InterceptedBean, io.micronaut.inject.proxy.InterceptedBeanProxy<T>, InterceptedProxy<T>, io.micronaut.inject.qualifiers.Qualified<T>

    public interface HotSwappableInterceptedProxy<T>
    extends InterceptedProxy<T>

    Extended version of InterceptedProxy that allows swapping out the previous instance.

    At compile time an implementation is generated that uses a ReentrantReadWriteLock to maintain a reference to the target of the proxy

    Since:
    1.0
    • Method Detail

      • swap

        T swap​(T newInstance)
        Swaps the underlying proxied instance for a new instance.
        Parameters:
        newInstance - The new instance
        Returns:
        The old instance