Class MapRewritePolicy

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MapRewritePolicy.Mode
      An enumeration to identify whether keys not in the MapMessage should be added or whether only existing keys should be updated.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static Logger LOGGER
      Allow subclasses access to the status logger without creating another instance.
    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
        Allow subclasses access to the status logger without creating another instance.
    • Method Detail

      • rewrite

        public LogEvent rewrite​(LogEvent source)
        Rewrite the event.
        Specified by:
        rewrite in interface RewritePolicy
        Parameters:
        source - a logging event that may be returned or used to create a new logging event.
        Returns:
        The LogEvent after rewriting.
      • toString

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

        @PluginFactory
        public static MapRewritePolicy createPolicy​(@PluginAttribute("mode")
                                                    java.lang.String mode,
                                                    @PluginElement("KeyValuePair")
                                                    KeyValuePair[] pairs)
        The factory method to create the MapRewritePolicy.
        Parameters:
        mode - The string representation of the Mode.
        pairs - key/value pairs for the new Map keys and values.
        Returns:
        The MapRewritePolicy.