You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2016/04/26 06:31:14 UTC

[18/34] logging-log4j2 git commit: LOG4J2-1342 added method ReusableMessage#memento() to take snapshot (used by AsyncAppender)

LOG4J2-1342 added method ReusableMessage#memento() to take snapshot (used by AsyncAppender)


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/8f3c146e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/8f3c146e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/8f3c146e

Branch: refs/heads/LOG4j2-494
Commit: 8f3c146e33039f525eaf1559d200c982c6ebf4cf
Parents: e7fea76
Author: rpopma <rp...@apache.org>
Authored: Fri Apr 22 14:36:21 2016 +0900
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Apr 25 21:30:29 2016 -0700

----------------------------------------------------------------------
 .../org/apache/logging/log4j/message/ReusableMessage.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/8f3c146e/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessage.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessage.java
index 0536b23..82e40ac 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessage.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessage.java
@@ -61,4 +61,12 @@ public interface ReusableMessage extends Message, StringBuilderFormattable {
      * @return the current number of parameters
      */
     short getParameterCount();
+
+    /**
+     * Returns an immutable snapshot of the current internal state of this reusable message. The returned snapshot
+     * will not be affected by subsequent modifications of this reusable message.
+     *
+     * @return an immutable snapshot of this message
+     */
+    Message memento();
 }