You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/10/23 18:53:37 UTC
[2/3] activemq-artemis git commit: NO-JIRA Individualizing Loggers on
TimedBuffer
NO-JIRA Individualizing Loggers on TimedBuffer
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/febd1f50
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/febd1f50
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/febd1f50
Branch: refs/heads/master
Commit: febd1f509c6d3cd1b76e5fcfb45da67e81fe9701
Parents: f5dfbf7
Author: Clebert Suconic <cl...@apache.org>
Authored: Mon Oct 23 14:53:02 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Oct 23 14:53:02 2017 -0400
----------------------------------------------------------------------
.../apache/activemq/artemis/core/io/buffer/TimedBuffer.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/febd1f50/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
index 6fc3e6b..f469bf8 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
@@ -32,9 +32,12 @@ import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper;
import org.apache.activemq.artemis.core.io.IOCallback;
import org.apache.activemq.artemis.core.journal.EncodingSupport;
import org.apache.activemq.artemis.journal.ActiveMQJournalLogger;
+import org.jboss.logging.Logger;
public final class TimedBuffer {
+ private static final Logger logger = Logger.getLogger(TimedBuffer.class);
+
private static final double MAX_TIMEOUT_ERROR_FACTOR = 1.5;
// Constants -----------------------------------------------------
@@ -442,14 +445,15 @@ public final class TimedBuffer {
if (++checks >= MAX_CHECKS_ON_SLEEP) {
if (failedChecks > MAX_CHECKS_ON_SLEEP * 0.5) {
- ActiveMQJournalLogger.LOGGER.debug("LockSupport.parkNanos with nano seconds is not working as expected, Your kernel possibly doesn't support real time. the Journal TimedBuffer will spin for timeouts");
+ logger.debug("LockSupport.parkNanos with nano seconds is not working as expected, Your kernel possibly doesn't support real time. the Journal TimedBuffer will spin for timeouts");
useSleep = false;
}
}
}
} catch (Exception e) {
useSleep = false;
- ActiveMQJournalLogger.LOGGER.warn(e.getMessage() + ", disabling sleep on TimedBuffer, using spin now", e);
+ // I don't think we need to individualize a logger code here, this is unlikely to happen anyways
+ logger.warn(e.getMessage() + ", disabling sleep on TimedBuffer, using spin now", e);
}
return useSleep;
}