Class NoOpObservedMonitor<T>

  • All Implemented Interfaces:
    ObservedMonitor<T>


    public class NoOpObservedMonitor<T>
    extends java.lang.Object
    implements ObservedMonitor<T>
    A monitor that performs no actual monitoring.
    • Field Detail

      • LISTENER

        public static final net.groboclown.retval.monitor.NoOpObservedMonitor.NoOpListener LISTENER
    • Method Detail

      • getInstance

        @Nonnull
        public static <T> NoOpObservedMonitor<T> getInstance​()
        Type-cast the placeholder No Op implementation to the needed format.
        Type Parameters:
        T - required type value
        Returns:
        the static instance
      • registerInstance

        @Nonnull
        public ObservedMonitor.Listener registerInstance​(@Nonnull
                                                         T instance)
        Description copied from interface: ObservedMonitor
        Register a new observable object with the monitor. The returned value must be immutable in all but unit test environments.
        Specified by:
        registerInstance in interface ObservedMonitor<T>
        Parameters:
        instance - instance to register
        Returns:
        a callback listener for when the close action occurs.
      • isTraceEnabled

        public boolean isTraceEnabled​()
        Description copied from interface: ObservedMonitor
        Is tracing enabled? If not enabled, then more memory efficient versions of objects may be used.
        Specified by:
        isTraceEnabled in interface ObservedMonitor<T>
        Returns:
        true if close tracing is enabled, false otherwise.