Tabnine Logo
DBI.setTimingCollector
Code IndexAdd Tabnine to your IDE (free)

How to use
setTimingCollector
method
in
org.skife.jdbi.v2.DBI

Best Java code snippets using org.skife.jdbi.v2.DBI.setTimingCollector (Showing top 5 results out of 315)

origin: dropwizard/dropwizard

dbi.setTimingCollector(new InstrumentedTimingCollector(environment.metrics(),
  new SanerNamingStrategy()));
origin: org.kill-bill.commons/killbill-jdbi

@Override
public IDBI get() {
  final DBI dbi = new DBI(ds);
  for (final ArgumentFactory argumentFactory : argumentFactorySet) {
    dbi.registerArgumentFactory(argumentFactory);
  }
  for (final ResultSetMapperFactory resultSetMapperFactory : resultSetMapperFactorySet) {
    dbi.registerMapper(resultSetMapperFactory);
  }
  for (final ResultSetMapper resultSetMapper : resultSetMapperSet) {
    dbi.registerMapper(resultSetMapper);
  }
  if (transactionHandler != null) {
    dbi.setTransactionHandler(transactionHandler);
  }
  if (sqlLog != null) {
    dbi.setSQLLog(sqlLog);
  } else if (config != null) {
    final Slf4jLogging sqlLog = new Slf4jLogging(logger, config.getLogLevel());
    dbi.setSQLLog(sqlLog);
  }
  if (timingCollector != null) {
    dbi.setTimingCollector(timingCollector);
  }
  return dbi;
}
origin: com.hubspot/BlazarData

@Override
public DBI get() {
 final DBI dbi = new DBI(transactionalDataSource);
 dbi.setSQLLog(new LogbackLog());
 if (environment.isPresent()) {
  environment.get().lifecycle().manage(managedDataSource);
  environment.get().healthChecks().register("db", new DBIHealthCheck(dbi, dataSourceFactory.getValidationQuery()));
  dbi.setTimingCollector(new InstrumentedTimingCollector(environment.get().metrics(), new SanerNamingStrategy()));
 }
 dbi.registerArgumentFactory(new OptionalArgumentFactory(dataSourceFactory.getDriverClass()));
 dbi.registerContainerFactory(new ImmutableListContainerFactory());
 dbi.registerContainerFactory(new ImmutableSetContainerFactory());
 dbi.registerContainerFactory(new OptionalContainerFactory());
 dbi.registerArgumentFactory(new JodaDateTimeArgumentFactory());
 dbi.registerMapper(new JodaDateTimeMapper());
 dbi.registerMapper(new RosettaMapperFactory());
 new RosettaObjectMapperOverride(objectMapper).override(dbi);
 return dbi;
}
origin: com.ning.jetty/ning-service-skeleton-jdbi

dbi.setTimingCollector(timingCollector);
origin: io.dropwizard/dropwizard-jdbi

dbi.setTimingCollector(new InstrumentedTimingCollector(environment.metrics(),
  new SanerNamingStrategy()));
org.skife.jdbi.v2DBIsetTimingCollector

Javadoc

Add a callback to accumulate timing information about the queries running from this data source.

Popular methods of DBI

  • <init>
    Constructor used to allow for obtaining a Connection in a customized manner. The org.skife.jdbi.v2.t
  • open
  • onDemand
    Create a new sql object which will obtain and release connections from this dbi instance, as it need
  • registerMapper
    Register a result set mapper which will have its parameterized type inspected to determine what it m
  • withHandle
    A convenience function which manages the lifecycle of a handle and yields it to a callback for use b
  • registerArgumentFactory
  • inTransaction
  • setSQLLog
    Specify the class used to log sql statements. Will be passed to all handles created from this instan
  • registerContainerFactory
  • setStatementLocator
    Use a non-standard StatementLocator to look up named statements for all handles created from this DB
  • setStatementRewriter
    Use a non-standard StatementRewriter to transform SQL for all Handle instances created by this DBI.
  • setTransactionHandler
    Specify the TransactionHandler instance to use. This allows overriding transaction semantics, or map
  • setStatementRewriter,
  • setTransactionHandler,
  • useHandle,
  • define,
  • close,
  • getStatementLocator,
  • getTransactionHandler,
  • registerColumnMapper

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Path (java.nio.file)
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JComboBox (javax.swing)
  • JOptionPane (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now