-
- All Known Implementing Classes:
DbClientTracing,DbCounter,DbMeter,DbTimer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface DbInterceptor
Interceptor to handle work around a database statement. Example of such interceptors: tracing, metrics.Interceptors can be defined as global interceptors, interceptors for a type of a statement and interceptors for a named statement. These are executed in the following order:
- Named interceptors - if there are any interceptors configured for a specific statement, they are executed first
- Type interceptors - if there are any interceptors configured for a type of statement, they are executed next
- Global interceptors - if there are any interceptors configured globally, they are executed last
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<DbInterceptorContext>statement(DbInterceptorContext context)Statement execution to be intercepted.
-
-
-
Method Detail
-
statement
CompletionStage<DbInterceptorContext> statement(DbInterceptorContext context)
Statement execution to be intercepted. This method is called before the statement execution starts.- Parameters:
context- Context to access data needed to process an interceptor- Returns:
- completion stage that completes when this interceptor is finished
-
-