Tabnine Logo
SqlTimer$Handle
Code IndexAdd Tabnine to your IDE (free)

How to use
SqlTimer$Handle
in
com.palantir.nexus.db.monitoring.timer

Best Java code snippets using com.palantir.nexus.db.monitoring.timer.SqlTimer$Handle (Showing top 10 results out of 315)

origin: palantir/atlasdb

} finally {
  closeSilently(ps);
  timerKey.stop();
  for (BlobHandler cleanup : cleanups) {
    try {
origin: com.palantir.atlasdb/commons-db

} finally {
  closeSilently(ps);
  timerKey.stop();
  for (BlobHandler cleanup : cleanups) {
    try {
origin: com.palantir.atlasdb/commons-db

} finally {
  closeSilently(ps);
  timerKey.stop();
  for (BlobHandler cleanup : cleanups) {
    try {
origin: com.palantir.atlasdb/commons-db

private <T> T wrapPreparedStatement(final Connection c,
    final FinalSQLString query, final Object[] vs, PreparedStatementVisitor<T> visitor, String description,
    AutoClose autoClose) throws PalantirSqlException, PalantirInterruptedException {
  SqlTimer.Handle timerKey = getSqlTimer().start(description, query.getKey(), query.getQuery());
  PreparedStatement ps = null;
  try {
    ps = BasicSQLUtils.runUninterruptably(
        executeStatementExecutor,
        () -> createPreparedStatement(c, query.getQuery(), vs), "SQL createPreparedStatement", c);
    return visitor.visit(ps);
  } catch (PalantirSqlException sqle) {
    throw wrapSQLExceptionWithVerboseLogging(sqle, query.getQuery(), vs);
  } finally {
    closeSilently(ps, autoClose);
    timerKey.stop();
  }
}
origin: com.palantir.atlasdb/commons-db

  @Override
  final public Handle start(String module, String sqlKey, String rawSql) {
    final List<Handle> handles = Lists.newArrayListWithCapacity(sqlTimers.size());
    for (SqlTimer sqlTimer : sqlTimers) {
      handles.add(sqlTimer.start(module, sqlKey, rawSql));
    }
    return () -> {
      for (Handle handle : handles) {
        handle.stop();
      }
    };
  }
}
origin: com.palantir.atlasdb/commons-db

@Override
public void close() {
  timerKey.stop();
  try {
    stmt.close();
    results.close();
    hasBeenClosed = true;
    long elapsed = System.currentTimeMillis() - creationLocation.getCreatingThreadInfo().getTimestamp();
    log.debug("Closed {} after {}ms", this, elapsed);
  } catch(SQLException sqlex) {
    log.error("Caught SQLException", sqlex); //$NON-NLS-1$
  }
}
origin: palantir/atlasdb

} finally {
  closeSilently(ps);
  timerKey.stop();
  for (BlobHandler cleanup : cleanups) {
    try {
origin: palantir/atlasdb

private <T> T wrapPreparedStatement(final Connection c,
    final FinalSQLString query, final Object[] vs, PreparedStatementVisitor<T> visitor, String description,
    AutoClose autoClose) throws PalantirSqlException, PalantirInterruptedException {
  SqlTimer.Handle timerKey = getSqlTimer().start(description, query.getKey(), query.getQuery());
  PreparedStatement ps = null;
  try {
    ps = BasicSQLUtils.runUninterruptably(
        executeStatementExecutor,
        () -> createPreparedStatement(c, query.getQuery(), vs), "SQL createPreparedStatement", c);
    return visitor.visit(ps);
  } catch (PalantirSqlException sqle) {
    throw wrapSQLExceptionWithVerboseLogging(sqle, query.getQuery(), vs);
  } finally {
    closeSilently(ps, autoClose);
    timerKey.stop();
  }
}
origin: palantir/atlasdb

  @Override
  final public Handle start(String module, String sqlKey, String rawSql) {
    final List<Handle> handles = Lists.newArrayListWithCapacity(sqlTimers.size());
    for (SqlTimer sqlTimer : sqlTimers) {
      handles.add(sqlTimer.start(module, sqlKey, rawSql));
    }
    return () -> {
      for (Handle handle : handles) {
        handle.stop();
      }
    };
  }
}
origin: palantir/atlasdb

@Override
public void close() {
  timerKey.stop();
  try {
    stmt.close();
    results.close();
    hasBeenClosed = true;
    long elapsed = System.currentTimeMillis() - creationLocation.getCreatingThreadInfo().getTimestamp();
    log.debug("Closed {} after {}ms", this, elapsed);
  } catch(SQLException sqlex) {
    log.error("Caught SQLException", sqlex); //$NON-NLS-1$
  }
}
com.palantir.nexus.db.monitoring.timerSqlTimer$Handle

Most used methods

  • stop
    Called when the SQL call is complete. Updates the SQL statistics and writes timing information to th

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • startActivity (Activity)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Table (org.hibernate.mapping)
    A relational table
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 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