Class AwaitCompletionReliabilityStrategy

    • Field Detail

      • counter

        private final java.util.concurrent.atomic.AtomicInteger counter
      • shutdown

        private final java.util.concurrent.atomic.AtomicBoolean shutdown
      • shutdownLock

        private final java.util.concurrent.locks.Lock shutdownLock
      • noLogEvents

        private final java.util.concurrent.locks.Condition noLogEvents
    • Constructor Detail

      • AwaitCompletionReliabilityStrategy

        public AwaitCompletionReliabilityStrategy​(LoggerConfig loggerConfig)
    • Method Detail

      • log

        public void log​(Supplier<LoggerConfig> reconfigured,
                        java.lang.String loggerName,
                        java.lang.String fqcn,
                        Marker marker,
                        Level level,
                        Message data,
                        java.lang.Throwable t)
        Description copied from interface: ReliabilityStrategy
        Logs an event.
        Specified by:
        log in interface ReliabilityStrategy
        Parameters:
        reconfigured - supplies the next LoggerConfig if the strategy's LoggerConfig is no longer active
        loggerName - The name of the Logger.
        fqcn - The fully qualified class name of the caller.
        marker - A Marker or null if none is present.
        level - The event Level.
        data - The Message.
        t - A Throwable or null.
      • log

        public void log​(Supplier<LoggerConfig> reconfigured,
                        java.lang.String loggerName,
                        java.lang.String fqcn,
                        java.lang.StackTraceElement location,
                        Marker marker,
                        Level level,
                        Message data,
                        java.lang.Throwable t)
        Description copied from interface: LocationAwareReliabilityStrategy
        Logs an event.
        Specified by:
        log in interface LocationAwareReliabilityStrategy
        Parameters:
        reconfigured - supplies the next LoggerConfig if the strategy's LoggerConfig is no longer active
        loggerName - The name of the Logger.
        fqcn - The fully qualified class name of the caller.
        location - The location of the caller or null.
        marker - A Marker or null if none is present.
        level - The event Level.
        data - The Message.
        t - A Throwable or null.
      • beforeLogEvent

        private boolean beforeLogEvent()
      • signalCompletionIfShutdown

        private void signalCompletionIfShutdown()
      • waitForCompletion

        private void waitForCompletion()
        Waits for all log events to complete before returning.