Class ReconfigureOnChangeFilter

  • All Implemented Interfaces:
    ContextAware, LifeCycle

    public class ReconfigureOnChangeFilter
    extends TurboFilter
    Reconfigure a LoggerContext when the configuration file changes.
    • Field Detail

      • DEFAULT_REFRESH_PERIOD

        public static final long DEFAULT_REFRESH_PERIOD
        Scan for changes in configuration file once every minute.
        See Also:
        Constant Field Values
      • refreshPeriod

        long refreshPeriod
      • mainConfigurationURL

        java.net.URL mainConfigurationURL
      • nextCheck

        protected volatile long nextCheck
      • invocationCounter

        private long invocationCounter
      • mask

        private volatile long mask
      • lastMaskCheck

        private volatile long lastMaskCheck
      • MASK_INCREASE_THRESHOLD

        private static final long MASK_INCREASE_THRESHOLD
        See Also:
        Constant Field Values
      • MASK_DECREASE_THRESHOLD

        private static final long MASK_DECREASE_THRESHOLD
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReconfigureOnChangeFilter

        public ReconfigureOnChangeFilter()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • updateMaskIfNecessary

        private void updateMaskIfNecessary​(long now)
      • detachReconfigurationToNewThread

        void detachReconfigurationToNewThread()
      • updateNextCheck

        void updateNextCheck​(long now)
      • changeDetected

        protected boolean changeDetected​(long now)
      • disableSubsequentReconfiguration

        void disableSubsequentReconfiguration()
      • getRefreshPeriod

        public long getRefreshPeriod()
      • setRefreshPeriod

        public void setRefreshPeriod​(long refreshPeriod)