Table of Contents |
---|
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: Under Discussion
...
Public Interfaces
Observer interface. When the observer is configured, it automatically starts and a background thread reports auditing statistics (periodically)Observers are instantiated by calling the no-arg constructor, then the configure() method is called, and then close() is called with no further record() calls expected.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
/** * The Observer interface. This class allows user to implement their own auditing solution. * * Notice that the Observer may be used by multiple threads, so the implementation should be thread safe. */ trait Observer extends Configurable { /** * Record the request and response pair based on the given information. */ def record(request: RequestChannel.Request, response: AbstractResponse): Unit /** * Close the observer with timeout. * * @param timeout the maximum time to wait to close the observer. * @param unit The time unit. */ def close(timeout: Long, unit: TimeUnit): Unit } |
...