ch.qos.logback.ext.spring
Interface ILoggingEventCache


public interface ILoggingEventCache

Abstraction interface for defining a cache for Logback ILoggingEvent instances.

Since:
0.1
Author:
Bryan Turner

Method Summary
 List<ch.qos.logback.classic.spi.ILoggingEvent> get()
          Retrieves a list containing 0 or more cached ILoggingEvents.
 void put(ch.qos.logback.classic.spi.ILoggingEvent event)
          Stores the provided event in the cache.
 

Method Detail

get

List<ch.qos.logback.classic.spi.ILoggingEvent> get()
Retrieves a list containing 0 or more cached ILoggingEvents.

Note: Implementations of this method must return a non-null list, even if the list is empty, and the returned list must not contain any null elements. If the caching implementation has discarded any of the events that were passed to put(ILoggingEvent), they should be completely omitted from the event list returned.

Returns:
a non-null list containing 0 or more cached events

put

void put(ch.qos.logback.classic.spi.ILoggingEvent event)
Stores the provided event in the cache.

Note: Implementations are free to "store" the event in a destructive or potentially-destructive way. This means the "cache" may actually just discard any events it receives, or it may wrap them in a SoftReference or other java.lang.ref type which could potentially result in the event being garbage collected before the get() method is called.

Parameters:
event - the event to cache


Copyright © 2014-2015. All Rights Reserved.