congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SqlTimer$Handle.stop
Code IndexAdd Tabnine to your IDE (free)

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

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

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$
  }
}
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

} 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();
  }
}
com.palantir.nexus.db.monitoring.timerSqlTimer$Handlestop

Javadoc

Called when the SQL call is complete. Updates the SQL statistics and writes timing information to the timing logger.

Popular methods of SqlTimer$Handle

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • setContentView (Activity)
    • scheduleAtFixedRate (ScheduledExecutorService)
    • addToBackStack (FragmentTransaction)
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • BigInteger (java.math)
      An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
    • SimpleDateFormat (java.text)
      Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
    • Iterator (java.util)
      An iterator over a sequence of objects, such as a collection.If a collection has been changed since
    • UUID (java.util)
      UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
    • JList (javax.swing)
    • Top 15 Vim Plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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