LOG4J2-2253 renamed ParameterVisitableMessage to ParameterVisitable
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/7060cc30 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/7060cc30 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/7060cc30 Branch: refs/heads/master Commit: 7060cc30761120e0adfae07bfe528c5b6cb0d697 Parents: 7bfe620 Author: rpopma <rpo...@apache.org> Authored: Mon Feb 26 19:31:42 2018 +0900 Committer: rpopma <rpo...@apache.org> Committed: Mon Feb 26 19:31:42 2018 +0900 ---------------------------------------------------------------------- .../log4j/message/ParameterVisitable.java | 30 ++++++++++++++++++++ .../message/ParameterVisitableMessage.java | 30 -------------------- .../log4j/message/ReusableObjectMessage.java | 2 +- .../message/ReusableParameterizedMessage.java | 2 +- .../log4j/message/ReusableSimpleMessage.java | 2 +- .../log4j/core/async/RingBufferLogEvent.java | 2 +- .../log4j/core/impl/MutableLogEvent.java | 2 +- 7 files changed, 35 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitable.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitable.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitable.java new file mode 100644 index 0000000..31d8c5f --- /dev/null +++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitable.java @@ -0,0 +1,30 @@ +package org.apache.logging.log4j.message; + +import org.apache.logging.log4j.util.PerformanceSensitive; + +/** + * Allows message parameters to be iterated over without any allocation + * or memory copies. + * + * @since 2.11 + */ +@PerformanceSensitive("allocation") +public interface ParameterVisitable { + + /** + * Performs the given action for each parameter until all values + * have been processed or the action throws an exception. + * <p> + * The second parameter lets callers pass in a stateful object to be modified with the key-value pairs, + * so the TriConsumer implementation itself can be stateless and potentially reusable. + * </p> + * + * @param action The action to be performed for each key-value pair in this collection + * @param state the object to be passed as the third parameter to each invocation on the + * specified ParameterConsumer. + * @param <S> type of the third parameter + * @since 2.11 + */ + <S> void forEachParameter(ParameterConsumer<S> action, S state); + +} http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitableMessage.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitableMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitableMessage.java deleted file mode 100644 index 5cb6228..0000000 --- a/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterVisitableMessage.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.apache.logging.log4j.message; - -import org.apache.logging.log4j.util.PerformanceSensitive; - -/** - * Allows message parameters to be iterated over without any allocation - * or memory copies. - * - * @since 2.11 - */ -@PerformanceSensitive("allocation") -public interface ParameterVisitableMessage extends Message { - - /** - * Performs the given action for each parameter until all values - * have been processed or the action throws an exception. - * <p> - * The second parameter lets callers pass in a stateful object to be modified with the key-value pairs, - * so the TriConsumer implementation itself can be stateless and potentially reusable. - * </p> - * - * @param action The action to be performed for each key-value pair in this collection - * @param state the object to be passed as the third parameter to each invocation on the - * specified ParameterConsumer. - * @param <S> type of the third parameter - * @since 2.11 - */ - <S> void forEachParameter(ParameterConsumer<S> action, S state); - -} http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableObjectMessage.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableObjectMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableObjectMessage.java index b542240..b973e5a 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableObjectMessage.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableObjectMessage.java @@ -24,7 +24,7 @@ import org.apache.logging.log4j.util.StringBuilders; * @since 2.6 */ @PerformanceSensitive("allocation") -public class ReusableObjectMessage implements ReusableMessage, ParameterVisitableMessage { +public class ReusableObjectMessage implements ReusableMessage, ParameterVisitable { private static final long serialVersionUID = 6922476812535519960L; private transient Object obj; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java index 55a079c..a1431f8 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java @@ -30,7 +30,7 @@ import org.apache.logging.log4j.util.StringBuilders; * @since 2.6 */ @PerformanceSensitive("allocation") -public class ReusableParameterizedMessage implements ReusableMessage, ParameterVisitableMessage { +public class ReusableParameterizedMessage implements ReusableMessage, ParameterVisitable { private static final int MIN_BUILDER_SIZE = 512; private static final int MAX_PARMS = 10; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableSimpleMessage.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableSimpleMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableSimpleMessage.java index e5d8622..49b0d7f 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableSimpleMessage.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableSimpleMessage.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.util.PerformanceSensitive; * @since 2.6 */ @PerformanceSensitive("allocation") -public class ReusableSimpleMessage implements ReusableMessage, CharSequence, ParameterVisitableMessage { +public class ReusableSimpleMessage implements ReusableMessage, CharSequence, ParameterVisitable { private static final long serialVersionUID = -9199974506498249809L; private static Object[] EMPTY_PARAMS = new Object[0]; private CharSequence charSequence; http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java index 651186a..27e7197 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEvent.java @@ -44,7 +44,7 @@ import com.lmax.disruptor.EventFactory; * When the Disruptor is started, the RingBuffer is populated with event objects. These objects are then re-used during * the life of the RingBuffer. */ -public class RingBufferLogEvent implements LogEvent, ReusableMessage, CharSequence, ParameterVisitableMessage { +public class RingBufferLogEvent implements LogEvent, ReusableMessage, CharSequence, ParameterVisitable { /** The {@code EventFactory} for {@code RingBufferLogEvent}s. */ public static final Factory FACTORY = new Factory(); http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7060cc30/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java index c5b4d4c..ecabcbc 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java @@ -42,7 +42,7 @@ import org.apache.logging.log4j.util.Strings; * Mutable implementation of the {@code LogEvent} interface. * @since 2.6 */ -public class MutableLogEvent implements LogEvent, ReusableMessage, ParameterVisitableMessage { +public class MutableLogEvent implements LogEvent, ReusableMessage, ParameterVisitable { private static final Message EMPTY = new SimpleMessage(Strings.EMPTY); private int threadPriority;