@@ -246,7 +247,7 @@ public abstract class AbstractLogstashTcpSocketAppender
After this many failed attempts, reconnection will still * be attempted, but failures will not be logged again - * (until after the connection is successful, and then fails again.) + * (until after the connection is successful, and then fails again.)
*/ private static final int MAX_REPEAT_CONNECTION_ERROR_LOG = 5; @@ -372,11 +373,11 @@ private class TcpSendingEventHandler implements EventHandlerWhen the keepAlive event is processed by the event handler, * if the {@link AbstractLogstashTcpSocketAppender#keepAliveDuration} * has elapsed since the last event was sent, * then the event handler will send the {@link AbstractLogstashTcpSocketAppender#keepAliveMessage} - * to the socket OutputStream. + * to the socket OutputStream.
* */ private class KeepAliveRunnable implements Runnable { @@ -418,8 +419,8 @@ public void run() { * Keeps reading the {@link ReaderCallable#inputStream} until the * end of the stream is reached. * - * This helps pro-actively detect server-side socket disconnections, - * specifically in the case of Amazon's Elastic Load Balancers (ELB). + *This helps proactively detect server-side socket disconnections, + * specifically in the case of Amazon's Elastic Load Balancers (ELB).
*/ private class ReaderCallable implements CallableIf the socket is non-null when this method returns, + * then it should be able to be used to send.
*/ private synchronized void openSocket() { int errorCount = 0; @@ -946,7 +947,6 @@ private synchronized void unscheduleWriteTimeout() { /** * Wrap exceptions thrown by {@link Encoder} */ - @SuppressWarnings("serial") private static class EncoderException extends Exception { EncoderException(Throwable cause) { super(cause); @@ -1278,8 +1278,8 @@ public Duration getInitialSendDelay() { /** * Convenience method for setting {@link PreferPrimaryDestinationConnectionStrategy#setSecondaryConnectionTTL(Duration)}. * - * When the {@link #connectionStrategy} is a {@link PreferPrimaryDestinationConnectionStrategy}, - * this will set its {@link PreferPrimaryDestinationConnectionStrategy#setSecondaryConnectionTTL(Duration)}. + *When the {@link #connectionStrategy} is a {@link PreferPrimaryDestinationConnectionStrategy}, + * this will set its {@link PreferPrimaryDestinationConnectionStrategy#setSecondaryConnectionTTL(Duration)}.
* * @see PreferPrimaryDestinationConnectionStrategy#setSecondaryConnectionTTL(Duration) * @param secondaryConnectionTTL the TTL of a connection when connected to a secondary destination @@ -1320,7 +1320,7 @@ public Duration getSecondaryConnectionTTL() { /** * Set the connection timeout when establishing a connection to a remote destination. * - * Use {@code 0} for an "infinite timeout" which often really means "use the OS defaults". + *Use {@code 0} for an "infinite timeout" which often really means "use the OS defaults".
* * @param connectionTimeout connection timeout */ @@ -1408,7 +1408,7 @@ public Duration getKeepAliveDuration() { * then the {@link #keepAliveMessage} will be sent to the socket in * order to keep the connection alive. * - * When {@code null}, zero or negative, no keepAlive messages will be sent. + *When {@code null}, zero or negative, no keepAlive messages will be sent.
* * @param keepAliveDuration duration between consecutive keep alive messages */ @@ -1424,15 +1424,15 @@ public String getKeepAliveMessage() { * Message to send for keeping the connection alive * if {@link #keepAliveDuration} is non-null and strictly positive. * - * The following values have special meaning: + *The following values have special meaning:
*- * Any other value will be used as-is. + * + *
Any other value will be used as-is.
* * @param keepAliveMessage the keep alive message */ @@ -1473,8 +1473,8 @@ public void setKeepAliveCharset(Charset keepAliveCharset) { * Defaults to {@value #DEFAULT_THREAD_NAME_FORMAT}. ** - * If you change the {@link #threadFactory}, then this - * value may not be honored. + * If you change the {@link #setThreadFactory(ThreadFactory) threadFactory}, + * then this value may not be honored. *
* * The string is a format pattern understood by {@link Formatter#format(String, Object...)}. diff --git a/src/main/java/net/logstash/logback/appender/AsyncDisruptorAppender.java b/src/main/java/net/logstash/logback/appender/AsyncDisruptorAppender.java index 3f6db21a..94c2cfea 100644 --- a/src/main/java/net/logstash/logback/appender/AsyncDisruptorAppender.java +++ b/src/main/java/net/logstash/logback/appender/AsyncDisruptorAppender.java @@ -45,11 +45,9 @@ import com.lmax.disruptor.EventHandler; import com.lmax.disruptor.EventTranslatorOneArg; import com.lmax.disruptor.ExceptionHandler; -import com.lmax.disruptor.LifecycleAware; import com.lmax.disruptor.PhasedBackoffWaitStrategy; import com.lmax.disruptor.RingBuffer; import com.lmax.disruptor.Sequence; -import com.lmax.disruptor.SequenceReportingEventHandler; import com.lmax.disruptor.SleepingWaitStrategy; import com.lmax.disruptor.WaitStrategy; import com.lmax.disruptor.dsl.Disruptor; @@ -86,6 +84,7 @@ * needing to explicitly shut down the appender. * Note that in this case, it is possible for appended log events to not * be handled (if the child thread has not had a chance to process them yet). + *
*
* By setting {@link #setDaemon(boolean)} to false, you can change this behavior.
* When false, child threads created by this appender will not be daemon threads,
@@ -133,7 +132,7 @@ public abstract class AsyncDisruptorAppender Currently, just logs to the logback context.