Interface AsyncLoggerConfigDelegate

All Known Implementing Classes:

public interface AsyncLoggerConfigDelegate
Encapsulates the mechanism used to log asynchronously. There is one delegate per configuration, which is shared by all AsyncLoggerConfig objects in the configuration.
  • Method Details

    • createRingBufferAdmin

      RingBufferAdmin createRingBufferAdmin(String contextName, String loggerConfigName)
      Creates and returns a new RingBufferAdmin that instruments the ringbuffer of this AsyncLoggerConfig.
      contextName - name of the LoggerContext
      loggerConfigName - name of the logger config
      the RingBufferAdmin that instruments the ringbuffer
    • getEventRoute

      EventRoute getEventRoute(Level level)
      Returns the EventRoute for the event with the specified level.
      level - the level of the event to log
      the EventRoute
    • enqueueEvent

      void enqueueEvent(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
      Enqueues the LogEvent on the mixed configuration ringbuffer. This method must only be used after tryEnqueue(LogEvent, AsyncLoggerConfig) returns false indicating that the ringbuffer is full, otherwise it may incur unnecessary synchronization.
    • tryEnqueue

      boolean tryEnqueue(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
    • setLogEventFactory

      void setLogEventFactory(LogEventFactory logEventFactory)
      Notifies the delegate what LogEventFactory an AsyncLoggerConfig is using, so the delegate can determine whether to populate the ring buffer with mutable log events or not. This method may be invoked multiple times for all AsyncLoggerConfigs that use this delegate.
      logEventFactory - the factory used