FileDocCategorySizeDatePackage
SQLiteClosable.javaAPI DocAndroid 1.5 API1741Wed May 06 22:41:54 BST 2009android.database.sqlite

SQLiteClosable

public abstract class SQLiteClosable extends Object
An object create from a SQLiteDatabase that can be closed.

Fields Summary
private int
mReferenceCount
private Object
mLock
Constructors Summary
Methods Summary
public voidacquireReference()

        synchronized(mLock) {
            if (mReferenceCount <= 0) {
                throw new IllegalStateException(
                        "attempt to acquire a reference on a close SQLiteClosable");
            }
            mReferenceCount++;     
        }
    
protected abstract voidonAllReferencesReleased()

protected voidonAllReferencesReleasedFromContainer()

       
      
public voidreleaseReference()

        synchronized(mLock) {
            mReferenceCount--;
            if (mReferenceCount == 0) {
                onAllReferencesReleased();
            }
        }
    
public voidreleaseReferenceFromContainer()

        synchronized(mLock) {
            mReferenceCount--;
            if (mReferenceCount == 0) {
                onAllReferencesReleasedFromContainer();
            }
        }