Example usage for android.database.sqlite SQLiteConnection collectDbStats

List of usage examples for android.database.sqlite SQLiteConnection collectDbStats

Introduction

In this page you can find the example usage for android.database.sqlite SQLiteConnection collectDbStats.

Prototype

void collectDbStats(ArrayList<DbStats> dbStatsList) 

Source Link

Document

Collects statistics about database connection memory usage.

Usage

From source file:io.requery.android.database.sqlite.SQLiteConnectionPool.java

/**
 * Collects statistics about database connection memory usage.
 *
 * @param dbStatsList The list to populate.
 *//*from w ww .ja  v a2  s  . c  o m*/
public void collectDbStats(ArrayList<SQLiteDebug.DbStats> dbStatsList) {
    synchronized (mLock) {
        if (mAvailablePrimaryConnection != null) {
            mAvailablePrimaryConnection.collectDbStats(dbStatsList);
        }

        for (SQLiteConnection connection : mAvailableNonPrimaryConnections) {
            connection.collectDbStats(dbStatsList);
        }

        for (SQLiteConnection connection : mAcquiredConnections.keySet()) {
            connection.collectDbStatsUnsafe(dbStatsList);
        }
    }
}