Class AbstractFilterable

    • Constructor Detail

      • AbstractFilterable

        protected AbstractFilterable()
      • AbstractFilterable

        protected AbstractFilterable​(Filter filter)
      • AbstractFilterable

        protected AbstractFilterable​(Filter filter,
                                     Property[] propertyArray)
        Since:
        2.11.2
    • Method Detail

      • addFilter

        public void addFilter​(Filter filter)
        Adds a filter.
        Specified by:
        addFilter in interface Filterable
        Parameters:
        filter - The Filter to add.
      • getFilter

        public Filter getFilter()
        Returns the Filter.
        Specified by:
        getFilter in interface Filterable
        Returns:
        the Filter or null.
      • hasFilter

        public boolean hasFilter()
        Determines if a Filter is present.
        Specified by:
        hasFilter in interface Filterable
        Returns:
        false if no Filter is present.
      • isFiltered

        public boolean isFiltered​(LogEvent event)
        Determine if the LogEvent should be processed or ignored.
        Specified by:
        isFiltered in interface Filterable
        Parameters:
        event - The LogEvent.
        Returns:
        true if the LogEvent should be processed.
      • removeFilter

        public void removeFilter​(Filter filter)
        Removes a Filter.
        Specified by:
        removeFilter in interface Filterable
        Parameters:
        filter - The Filter to remove.
      • stop

        public boolean stop​(long timeout,
                            TimeUnit timeUnit)
        Cleanup the Filter.
        Specified by:
        stop in interface LifeCycle2
        Overrides:
        stop in class AbstractLifeCycle
        Parameters:
        timeout - the maximum time to wait
        timeUnit - the time unit of the timeout argument
        Returns:
        true if the receiver was stopped cleanly and normally, false otherwise.
      • stop

        protected boolean stop​(long timeout,
                               TimeUnit timeUnit,
                               boolean changeLifeCycleState)
        Cleanup the Filter.
      • getPropertyArray

        public Property[] getPropertyArray()