Class TemplateContext


  • public final class TemplateContext
    extends Object
    A context object for templates that allows caches to validate existing templates or create new ones. If two template contexts are equal (via equals(java.lang.Object)) then the templates they produce are interchangeable.

    Template contexts are created by the frontend and passed through to backend implementations via the LogData interface.

    • Constructor Detail

      • TemplateContext

        public TemplateContext​(MessageParser parser,
                               String message)
        Creates a template context for a log statement.
    • Method Detail

      • getParser

        public MessageParser getParser()
        Returns the message parser for the log statement.
      • getMessage

        public String getMessage()
        Returns the message for the log statement.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object