All Downloads are FREE. Search and download functionalities are using the official Maven repository.

querqy.lucene.rewrite.infologging.Sink Maven / Gradle / Ivy

There is a newer version: 5.8.lucene961.1
Show newest version
package querqy.lucene.rewrite.infologging;

import querqy.rewrite.SearchEngineRequestAdapter;

/**
 * Info logging messages can be written to various types of Sinks.
 */
public interface Sink {

    /**
     * 

Log a message. If the implementation wants to cache the message during the request, it should use the * request context via {@link SearchEngineRequestAdapter#getContext()} for caching and flush the output when * {@link #endOfRequest(SearchEngineRequestAdapter)} is called.

*

Sink objects can be shared across requests.

* * @param message The message to be logged * @param rewriterId The rewriter for which the event should be logged * @param searchEngineRequestAdapter Provides the context for collecting the log output */ void log(Object message, String rewriterId, SearchEngineRequestAdapter searchEngineRequestAdapter); /** *

Signals the end of a request. Messages that were cached via the * {@link SearchEngineRequestAdapter#getContext()} should now be flushed.

* * @param searchEngineRequestAdapter Provides the context for collecting the log output */ void endOfRequest(SearchEngineRequestAdapter searchEngineRequestAdapter); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy