Interface AsyncLoggerConfigDelegate
-
- All Known Implementing Classes:
AsyncLoggerConfigDisruptor
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RingBufferAdmin
createRingBufferAdmin(String contextName, String loggerConfigName)
Creates and returns a newRingBufferAdmin
that instruments the ringbuffer of thisAsyncLoggerConfig
.void
enqueueEvent(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
EventRoute
getEventRoute(Level level)
Returns theEventRoute
for the event with the specified level.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.boolean
tryEnqueue(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
-
-
-
Method Detail
-
createRingBufferAdmin
RingBufferAdmin createRingBufferAdmin(String contextName, String loggerConfigName)
Creates and returns a newRingBufferAdmin
that instruments the ringbuffer of thisAsyncLoggerConfig
.- Parameters:
contextName
- name of theLoggerContext
loggerConfigName
- name of the logger config- Returns:
- the RingBufferAdmin that instruments the ringbuffer
-
getEventRoute
EventRoute getEventRoute(Level level)
Returns theEventRoute
for the event with the specified level.- Parameters:
level
- the level of the event to log- Returns:
- the
EventRoute
-
enqueueEvent
void enqueueEvent(LogEvent event, AsyncLoggerConfig asyncLoggerConfig)
-
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 invoced multiple times for all AsyncLoggerConfigs that use this delegate.- Parameters:
logEventFactory
- the factory used
-
-