예제 #1
0
 private void recycleConnectionWaiterLocked(ConnectionWaiter waiter) {
   waiter.mNext = mConnectionWaiterPool;
   waiter.mThread = null;
   waiter.mSql = null;
   waiter.mAssignedConnection = null;
   waiter.mException = null;
   waiter.mNonce += 1;
   mConnectionWaiterPool = waiter;
 }
예제 #2
0
 private ConnectionWaiter obtainConnectionWaiterLocked(
     Thread thread,
     long startTime,
     int priority,
     boolean wantPrimaryConnection,
     String sql,
     int connectionFlags) {
   ConnectionWaiter waiter = mConnectionWaiterPool;
   if (waiter != null) {
     mConnectionWaiterPool = waiter.mNext;
     waiter.mNext = null;
   } else {
     waiter = new ConnectionWaiter();
   }
   waiter.mThread = thread;
   waiter.mStartTime = startTime;
   waiter.mPriority = priority;
   waiter.mWantPrimaryConnection = wantPrimaryConnection;
   waiter.mSql = sql;
   waiter.mConnectionFlags = connectionFlags;
   return waiter;
 }