test_class.file: agent/embedded/src/test/java/org/glowroot/agent/embedded/util/DataSourceTest.java
test_class.identifier: DataSourceTest
test_case.body: @Test
      public void testDebugNoArgs() throws SQLException {
          // given
          Logger logger = mock(Logger.class);
          when(logger.isDebugEnabled()).thenReturn(true);
          // when
          DataSource.debug(logger, "select x from y");
          // then
          verify(logger).isDebugEnabled();
          verify(logger).debug("select x from y");
          verifyNoMoreInteractions(logger);
      }
test_case.class_method_signature: DataSourceTest.testDebugNoArgs()
test_case.full_signature: @Test public void testDebugNoArgs()
test_case.identifier: testDebugNoArgs
test_case.invocations: mock thenReturn when isDebugEnabled debug isDebugEnabled verify debug verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDebugNoArgs()
focal_class.declarator: logger = LoggerFactory.getLogger(DataSource.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(DataSource.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: CACHE_SIZE =
              Integer.getInteger("glowroot.internal.h2.cacheSize", 8192)
focal_class.modifier: private static final
focal_class.original_string: private static final int CACHE_SIZE =
              Integer.getInteger("glowroot.internal.h2.cacheSize", 8192);
focal_class.type: int
focal_class.var_name: CACHE_SIZE
focal_class.declarator: QUERY_TIMEOUT_SECONDS =
              Integer.getInteger("glowroot.internal.h2.queryTimeout", 60)
focal_class.modifier: private static final
focal_class.original_string: private static final int QUERY_TIMEOUT_SECONDS =
              Integer.getInteger("glowroot.internal.h2.queryTimeout", 60);
focal_class.type: int
focal_class.var_name: QUERY_TIMEOUT_SECONDS
focal_class.declarator: dbFile
focal_class.modifier: private final @Nullable
focal_class.original_string: private final @Nullable File dbFile;
focal_class.type: File
focal_class.var_name: dbFile
focal_class.declarator: shutdownHookThread
focal_class.modifier: private final
focal_class.original_string: private final Thread shutdownHookThread;
focal_class.type: Thread
focal_class.var_name: shutdownHookThread
focal_class.declarator: lock = new Object()
focal_class.modifier: private final
focal_class.original_string: private final Object lock = new Object();
focal_class.type: Object
focal_class.var_name: lock
focal_class.declarator: connection
focal_class.modifier: @GuardedBy("lock")
      private
focal_class.original_string: @GuardedBy("lock")
      private JdbcConnection connection;
focal_class.type: JdbcConnection
focal_class.var_name: connection
focal_class.declarator: closed
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean closed;
focal_class.type: boolean
focal_class.var_name: closed
focal_class.declarator: suppressQueryTimeout = new ThreadLocal<Boolean>() {
          @Override
          protected Boolean initialValue() {
              return false;
          }
      }
focal_class.modifier: @SuppressWarnings("nullness:type.argument.type.incompatible")
      private final
focal_class.original_string: @SuppressWarnings("nullness:type.argument.type.incompatible")
      private final ThreadLocal<Boolean> suppressQueryTimeout = new ThreadLocal<Boolean>() {
          @Override
          protected Boolean initialValue() {
              return false;
          }
      };
focal_class.type: ThreadLocal<Boolean>
focal_class.var_name: suppressQueryTimeout
focal_class.declarator: tables =
              Maps.newConcurrentMap()
focal_class.modifier: private final
focal_class.original_string: private final Map</*@Untainted*/ String, ImmutableList<Column>> tables =
              Maps.newConcurrentMap();
focal_class.type: Map</*@Untainted*/ String, ImmutableList<Column>>
focal_class.var_name: tables
focal_class.declarator: indexes =
              Maps.newConcurrentMap()
focal_class.modifier: private final
focal_class.original_string: private final Map</*@Untainted*/ String, ImmutableList<Index>> indexes =
              Maps.newConcurrentMap();
focal_class.type: Map</*@Untainted*/ String, ImmutableList<Index>>
focal_class.var_name: indexes
focal_class.declarator: preparedStatementCache =
              CacheBuilder.newBuilder().weakValues()
                      .build(new CacheLoader</*@Untainted*/ String, PreparedStatement>() {
                          @Override
                          @SuppressWarnings("GuardedBy")
                          public PreparedStatement load(@Untainted String sql) throws SQLException {
                              return connection.prepareStatement(sql);
                          }
                      })
focal_class.modifier: private final
focal_class.original_string: private final LoadingCache</*@Untainted*/ String, PreparedStatement> preparedStatementCache =
              CacheBuilder.newBuilder().weakValues()
                      .build(new CacheLoader</*@Untainted*/ String, PreparedStatement>() {
                          @Override
                          @SuppressWarnings("GuardedBy")
                          public PreparedStatement load(@Untainted String sql) throws SQLException {
                              return connection.prepareStatement(sql);
                          }
                      });
focal_class.type: LoadingCache</*@Untainted*/ String, PreparedStatement>
focal_class.var_name: preparedStatementCache
focal_class.file: agent/embedded/src/main/java/org/glowroot/agent/embedded/util/DataSource.java
focal_class.identifier: DataSource
focal_class.class_method_signature: DataSource.DataSource()
focal_class.full_signature: public  DataSource()
focal_class.identifier: DataSource
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DataSource()
focal_class.class_method_signature: DataSource.DataSource(File dbFile)
focal_class.full_signature: public  DataSource(File dbFile)
focal_class.identifier: DataSource
focal_class.modifiers: public
focal_class.parameters: (File dbFile)
focal_class.signature:  DataSource(File dbFile)
focal_class.class_method_signature: DataSource.defrag()
focal_class.full_signature: public void defrag()
focal_class.identifier: defrag
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void defrag()
focal_class.class_method_signature: DataSource.compact()
focal_class.full_signature: public void compact()
focal_class.identifier: compact
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void compact()
focal_class.class_method_signature: DataSource.getH2DataFileSize()
focal_class.full_signature: public long getH2DataFileSize()
focal_class.identifier: getH2DataFileSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getH2DataFileSize()
focal_class.class_method_signature: DataSource.analyzeH2DiskSpace()
focal_class.full_signature: public List<H2Table> analyzeH2DiskSpace()
focal_class.identifier: analyzeH2DiskSpace
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<H2Table>
focal_class.signature: List<H2Table> analyzeH2DiskSpace()
focal_class.class_method_signature: DataSource.deleteAll()
focal_class.full_signature: public void deleteAll()
focal_class.identifier: deleteAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deleteAll()
focal_class.class_method_signature: DataSource.execute(@Untainted String sql)
focal_class.full_signature: public void execute(@Untainted String sql)
focal_class.identifier: execute
focal_class.modifiers: public
focal_class.parameters: (@Untainted String sql)
focal_class.return: void
focal_class.signature: void execute(@Untainted String sql)
focal_class.class_method_signature: DataSource.queryForLong(final @Untainted String sql, Object... args)
focal_class.full_signature: public long queryForLong(final @Untainted String sql, Object... args)
focal_class.identifier: queryForLong
focal_class.modifiers: public
focal_class.parameters: (final @Untainted String sql, Object... args)
focal_class.return: long
focal_class.signature: long queryForLong(final @Untainted String sql, Object... args)
focal_class.class_method_signature: DataSource.queryForOptionalLong(final @Untainted String sql, Object... args)
focal_class.full_signature: public @Nullable Long queryForOptionalLong(final @Untainted String sql, Object... args)
focal_class.identifier: queryForOptionalLong
focal_class.modifiers: public @Nullable
focal_class.parameters: (final @Untainted String sql, Object... args)
focal_class.return: Long
focal_class.signature: Long queryForOptionalLong(final @Untainted String sql, Object... args)
focal_class.class_method_signature: DataSource.queryForStringList(final @Untainted String sql)
focal_class.full_signature: public List<String> queryForStringList(final @Untainted String sql)
focal_class.identifier: queryForStringList
focal_class.modifiers: public
focal_class.parameters: (final @Untainted String sql)
focal_class.return: List<String>
focal_class.signature: List<String> queryForStringList(final @Untainted String sql)
focal_class.class_method_signature: DataSource.query(JdbcQuery<T> jdbcQuery)
focal_class.full_signature: public T query(JdbcQuery<T> jdbcQuery)
focal_class.identifier: query
focal_class.modifiers: public
focal_class.parameters: (JdbcQuery<T> jdbcQuery)
focal_class.return: T
focal_class.signature: T query(JdbcQuery<T> jdbcQuery)
focal_class.class_method_signature: DataSource.queryAtMostOne(JdbcRowQuery<T> jdbcQuery)
focal_class.full_signature: public T queryAtMostOne(JdbcRowQuery<T> jdbcQuery)
focal_class.identifier: queryAtMostOne
focal_class.modifiers: public
focal_class.parameters: (JdbcRowQuery<T> jdbcQuery)
focal_class.return: T
focal_class.signature: T queryAtMostOne(JdbcRowQuery<T> jdbcQuery)
focal_class.class_method_signature: DataSource.query(JdbcRowQuery<T> jdbcQuery)
focal_class.full_signature: public List<T> query(JdbcRowQuery<T> jdbcQuery)
focal_class.identifier: query
focal_class.modifiers: public
focal_class.parameters: (JdbcRowQuery<T> jdbcQuery)
focal_class.return: List<T>
focal_class.signature: List<T> query(JdbcRowQuery<T> jdbcQuery)
focal_class.class_method_signature: DataSource.update(final @Untainted String sql, final @Nullable Object... args)
focal_class.full_signature: public int update(final @Untainted String sql, final @Nullable Object... args)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (final @Untainted String sql, final @Nullable Object... args)
focal_class.return: int
focal_class.signature: int update(final @Untainted String sql, final @Nullable Object... args)
focal_class.class_method_signature: DataSource.update(JdbcUpdate jdbcUpdate)
focal_class.full_signature: public int update(JdbcUpdate jdbcUpdate)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (JdbcUpdate jdbcUpdate)
focal_class.return: int
focal_class.signature: int update(JdbcUpdate jdbcUpdate)
focal_class.class_method_signature: DataSource.batchUpdate(JdbcUpdate jdbcUpdate)
focal_class.full_signature: public int[] batchUpdate(JdbcUpdate jdbcUpdate)
focal_class.identifier: batchUpdate
focal_class.modifiers: public
focal_class.parameters: (JdbcUpdate jdbcUpdate)
focal_class.return: int[]
focal_class.signature: int[] batchUpdate(JdbcUpdate jdbcUpdate)
focal_class.class_method_signature: DataSource.deleteBefore(@Untainted String tableName, long captureTime)
focal_class.full_signature: public void deleteBefore(@Untainted String tableName, long captureTime)
focal_class.identifier: deleteBefore
focal_class.modifiers: public
focal_class.parameters: (@Untainted String tableName, long captureTime)
focal_class.return: void
focal_class.signature: void deleteBefore(@Untainted String tableName, long captureTime)
focal_class.class_method_signature: DataSource.deleteBefore(@Untainted String tableName, @Untainted String columnName,
              long captureTime)
focal_class.full_signature: public void deleteBefore(@Untainted String tableName, @Untainted String columnName,
              long captureTime)
focal_class.identifier: deleteBefore
focal_class.modifiers: public
focal_class.parameters: (@Untainted String tableName, @Untainted String columnName,
              long captureTime)
focal_class.return: void
focal_class.signature: void deleteBefore(@Untainted String tableName, @Untainted String columnName,
              long captureTime)
focal_class.class_method_signature: DataSource.deleteBeforeUsingLock(@Untainted String tableName, @Untainted String columnName,
              long captureTime, Object externalLock)
focal_class.full_signature: public void deleteBeforeUsingLock(@Untainted String tableName, @Untainted String columnName,
              long captureTime, Object externalLock)
focal_class.identifier: deleteBeforeUsingLock
focal_class.modifiers: public
focal_class.parameters: (@Untainted String tableName, @Untainted String columnName,
              long captureTime, Object externalLock)
focal_class.return: void
focal_class.signature: void deleteBeforeUsingLock(@Untainted String tableName, @Untainted String columnName,
              long captureTime, Object externalLock)
focal_class.class_method_signature: DataSource.syncTable(@Untainted String tableName, List<Column> columns)
focal_class.full_signature: public void syncTable(@Untainted String tableName, List<Column> columns)
focal_class.identifier: syncTable
focal_class.modifiers: public
focal_class.parameters: (@Untainted String tableName, List<Column> columns)
focal_class.return: void
focal_class.signature: void syncTable(@Untainted String tableName, List<Column> columns)
focal_class.class_method_signature: DataSource.syncIndexes(@Untainted String tableName, ImmutableList<Index> indexes)
focal_class.full_signature: public void syncIndexes(@Untainted String tableName, ImmutableList<Index> indexes)
focal_class.identifier: syncIndexes
focal_class.modifiers: public
focal_class.parameters: (@Untainted String tableName, ImmutableList<Index> indexes)
focal_class.return: void
focal_class.signature: void syncIndexes(@Untainted String tableName, ImmutableList<Index> indexes)
focal_class.class_method_signature: DataSource.getDbFileSize()
focal_class.full_signature:  long getDbFileSize()
focal_class.identifier: getDbFileSize
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getDbFileSize()
focal_class.class_method_signature: DataSource.tableExists(String tableName)
focal_class.full_signature: public boolean tableExists(String tableName)
focal_class.identifier: tableExists
focal_class.modifiers: public
focal_class.parameters: (String tableName)
focal_class.return: boolean
focal_class.signature: boolean tableExists(String tableName)
focal_class.class_method_signature: DataSource.columnExists(String tableName, String columnName)
focal_class.full_signature: public boolean columnExists(String tableName, String columnName)
focal_class.identifier: columnExists
focal_class.modifiers: public
focal_class.parameters: (String tableName, String columnName)
focal_class.return: boolean
focal_class.signature: boolean columnExists(String tableName, String columnName)
focal_class.class_method_signature: DataSource.renameTable(@Untainted String oldTableName, @Untainted String newTableName)
focal_class.full_signature: public void renameTable(@Untainted String oldTableName, @Untainted String newTableName)
focal_class.identifier: renameTable
focal_class.modifiers: public
focal_class.parameters: (@Untainted String oldTableName, @Untainted String newTableName)
focal_class.return: void
focal_class.signature: void renameTable(@Untainted String oldTableName, @Untainted String newTableName)
focal_class.class_method_signature: DataSource.renameColumn(@Untainted String tableName, @Untainted String oldColumnName,
              @Untainted String newColumnName)
focal_class.full_signature: public void renameColumn(@Untainted String tableName, @Untainted String oldColumnName,
              @Untainted String newColumnName)
focal_class.identifier: renameColumn
focal_class.modifiers: public
focal_class.parameters: (@Untainted String tableName, @Untainted String oldColumnName,
              @Untainted String newColumnName)
focal_class.return: void
focal_class.signature: void renameColumn(@Untainted String tableName, @Untainted String oldColumnName,
              @Untainted String newColumnName)
focal_class.class_method_signature: DataSource.suppressQueryTimeout(Callable<V> callable)
focal_class.full_signature: public V suppressQueryTimeout(Callable<V> callable)
focal_class.identifier: suppressQueryTimeout
focal_class.modifiers: public
focal_class.parameters: (Callable<V> callable)
focal_class.return: V
focal_class.signature: V suppressQueryTimeout(Callable<V> callable)
focal_class.class_method_signature: DataSource.close()
focal_class.full_signature: @OnlyUsedByTests public void close()
focal_class.identifier: close
focal_class.modifiers: @OnlyUsedByTests public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: DataSource.checkConnectionUnderLock()
focal_class.full_signature: @GuardedBy("lock") private void checkConnectionUnderLock()
focal_class.identifier: checkConnectionUnderLock
focal_class.modifiers: @GuardedBy("lock") private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkConnectionUnderLock()
focal_class.class_method_signature: DataSource.prepareStatementUnderLock(@Untainted String sql,
              int queryTimeoutSeconds)
focal_class.full_signature: @GuardedBy("lock") private PreparedStatement prepareStatementUnderLock(@Untainted String sql,
              int queryTimeoutSeconds)
focal_class.identifier: prepareStatementUnderLock
focal_class.modifiers: @GuardedBy("lock") private
focal_class.parameters: (@Untainted String sql,
              int queryTimeoutSeconds)
focal_class.return: PreparedStatement
focal_class.signature: PreparedStatement prepareStatementUnderLock(@Untainted String sql,
              int queryTimeoutSeconds)
focal_class.class_method_signature: DataSource.queryUnderLock(@Untainted String sql, Object[] args,
              ResultSetExtractor<T> rse)
focal_class.full_signature: @GuardedBy("lock") private T queryUnderLock(@Untainted String sql, Object[] args,
              ResultSetExtractor<T> rse)
focal_class.identifier: queryUnderLock
focal_class.modifiers: @GuardedBy("lock") private
focal_class.parameters: (@Untainted String sql, Object[] args,
              ResultSetExtractor<T> rse)
focal_class.return: T
focal_class.signature: T queryUnderLock(@Untainted String sql, Object[] args,
              ResultSetExtractor<T> rse)
focal_class.class_method_signature: DataSource.analyzeH2DiskSpaceUnderSuppressQueryTimeout()
focal_class.full_signature: private List<H2Table> analyzeH2DiskSpaceUnderSuppressQueryTimeout()
focal_class.identifier: analyzeH2DiskSpaceUnderSuppressQueryTimeout
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<H2Table>
focal_class.signature: List<H2Table> analyzeH2DiskSpaceUnderSuppressQueryTimeout()
focal_class.class_method_signature: DataSource.getAllTableNames()
focal_class.full_signature: @GuardedBy("lock") private List</*@Untainted*/ String> getAllTableNames()
focal_class.identifier: getAllTableNames
focal_class.modifiers: @GuardedBy("lock") private
focal_class.parameters: ()
focal_class.return: List</*@Untainted*/ String>
focal_class.signature: List</*@Untainted*/ String> getAllTableNames()
focal_class.class_method_signature: DataSource.createConnection(@Nullable File dbFile)
focal_class.full_signature: private static JdbcConnection createConnection(@Nullable File dbFile)
focal_class.identifier: createConnection
focal_class.modifiers: private static
focal_class.parameters: (@Nullable File dbFile)
focal_class.return: JdbcConnection
focal_class.signature: JdbcConnection createConnection(@Nullable File dbFile)
focal_class.class_method_signature: DataSource.extractAndClose(ResultSet resultSet, ResultSetExtractor<T> rse)
focal_class.full_signature: private static T extractAndClose(ResultSet resultSet, ResultSetExtractor<T> rse)
focal_class.identifier: extractAndClose
focal_class.modifiers: private static
focal_class.parameters: (ResultSet resultSet, ResultSetExtractor<T> rse)
focal_class.return: T
focal_class.signature: T extractAndClose(ResultSet resultSet, ResultSetExtractor<T> rse)
focal_class.class_method_signature: DataSource.debug(String sql, @Nullable Object... args)
focal_class.full_signature: private static void debug(String sql, @Nullable Object... args)
focal_class.identifier: debug
focal_class.modifiers: private static
focal_class.parameters: (String sql, @Nullable Object... args)
focal_class.return: void
focal_class.signature: void debug(String sql, @Nullable Object... args)
focal_class.class_method_signature: DataSource.debug(Logger logger, String sql, @Nullable Object... args)
focal_class.full_signature: @VisibleForTesting static void debug(Logger logger, String sql, @Nullable Object... args)
focal_class.identifier: debug
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (Logger logger, String sql, @Nullable Object... args)
focal_class.return: void
focal_class.signature: void debug(Logger logger, String sql, @Nullable Object... args)
focal_method.body: private static void debug(String sql, @Nullable Object... args) {
          debug(logger, sql, args);
      }
focal_method.class_method_signature: DataSource.debug(String sql, @Nullable Object... args)
focal_method.full_signature: private static void debug(String sql, @Nullable Object... args)
focal_method.identifier: debug
focal_method.invocations: debug
focal_method.modifiers: private static
focal_method.parameters: (String sql, @Nullable Object... args)
focal_method.return: void
focal_method.signature: void debug(String sql, @Nullable Object... args)