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

[2/2] logging-log4j2 git commit: LOG4J2-1349 updated javadoc related to freeze()

LOG4J2-1349 updated javadoc related to freeze()


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

Branch: refs/heads/LOG4J2-1349-gcfree-threadcontext
Commit: 191c3f958bafc59b70757dbd0120a1da32e53120
Parents: d1ab367
Author: rpopma <rp...@apache.org>
Authored: Sun Sep 4 16:30:54 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Sep 4 16:30:54 2016 +0900

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/spi/MutableContextData.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/191c3f95/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
index 14de7ca..96251ef 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
@@ -32,6 +32,7 @@ public interface MutableContextData extends ContextData {
      * @throws java.util.ConcurrentModificationException some implementations may not support structural modifications
      *          to this context data while iterating over the contents with {@link #forEach(BiConsumer)} or
      *          {@link #forEach(TriConsumer, Object)}.
+     * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
     void clear();
 
@@ -43,6 +44,7 @@ public interface MutableContextData extends ContextData {
      * @throws java.util.ConcurrentModificationException some implementations may not support structural modifications
      *          to this context data while iterating over the contents with {@link #forEach(BiConsumer)} or
      *          {@link #forEach(TriConsumer, Object)}.
+     * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
     void putValue(final String key, final Object value);
 
@@ -52,6 +54,7 @@ public interface MutableContextData extends ContextData {
      * @throws java.util.ConcurrentModificationException some implementations may not support structural modifications
      *          to this context data while iterating over the contents with {@link #forEach(BiConsumer)} or
      *          {@link #forEach(TriConsumer, Object)}.
+     * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
     void putAll(final ContextData source);
 
@@ -62,11 +65,13 @@ public interface MutableContextData extends ContextData {
      * @throws java.util.ConcurrentModificationException some implementations may not support structural modifications
      *          to this context data while iterating over the contents with {@link #forEach(BiConsumer)} or
      *          {@link #forEach(TriConsumer, Object)}.
+     * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
     void remove(final String key);
 
     /**
-     * Ensures that further changes to this object are ignored.
+     * Makes this collection immutable. Attempts to modify the collection after the {@code freeze()} method was called
+     * will result in an {@code UnsupportedOperationException} being thrown.
      */
     void freeze();