com.van.logging.IBufferMonitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appender-core Show documentation
Show all versions of appender-core Show documentation
Core functionality to send content to various channels, used by appender-log4j2
package com.van.logging;
/**
* Monitors a {@link IFlushAndPublish} and flushes the buffer depending on
* the implemented policy. The {@link IFlushAndPublish#flushAndPublish()}
* can be used by implementations to flush the queue.
*/
public interface IBufferMonitor {
/**
* A log event has just been added to the event buffer. Handlers
* can decide to flush the buffer if the conditions are right.
*
* @param event the event just added to the buffer.
* @param flushAndPublisher the {@link IFlushAndPublish} to use to publish.
*/
void eventAdded(final T event, final IFlushAndPublish flushAndPublisher);
}