Example usage for android.database.sqlite SQLiteConnection collectDbStatsUnsafe

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

Introduction

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

Prototype

void collectDbStatsUnsafe(ArrayList<DbStats> dbStatsList) 

Source Link

Document

Collects statistics about database connection memory usage, in the case where the caller might not actually own the connection.

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. j  a  v a 2  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);
        }
    }
}