Class PerformancePlugin

java.lang.Object
pl.sparkbit.commons.mybatis.metrics.PerformancePlugin
All Implemented Interfaces:
org.apache.ibatis.plugin.Interceptor

@Signature(type=org.apache.ibatis.executor.Executor.class,method="update",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class}) @Signature(type=org.apache.ibatis.executor.Executor.class,method="query",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class,org.apache.ibatis.session.RowBounds.class,org.apache.ibatis.session.ResultHandler.class}) @Signature(type=org.apache.ibatis.executor.Executor.class,method="query",args={org.apache.ibatis.mapping.MappedStatement.class,java.lang.Object.class,org.apache.ibatis.session.RowBounds.class,org.apache.ibatis.session.ResultHandler.class,org.apache.ibatis.cache.CacheKey.class,org.apache.ibatis.mapping.BoundSql.class}) public class PerformancePlugin extends Object implements org.apache.ibatis.plugin.Interceptor
To use this class it must be registered with MyBatis and implementation of MyBatisMetricsCollector must be present in the Spring context.
  • Constructor Details

    • PerformancePlugin

      public PerformancePlugin()
  • Method Details

    • intercept

      public Object intercept(org.apache.ibatis.plugin.Invocation invocation) throws Throwable
      Specified by:
      intercept in interface org.apache.ibatis.plugin.Interceptor
      Throws:
      Throwable
    • plugin

      public Object plugin(Object target)
      Specified by:
      plugin in interface org.apache.ibatis.plugin.Interceptor
    • setProperties

      public void setProperties(Properties properties)
      Specified by:
      setProperties in interface org.apache.ibatis.plugin.Interceptor