Skip to content

Most visited

Recently visited

navigation

SQLiteClosable

public abstract class SQLiteClosable
extends Object implements Closeable

java.lang.Object
   ↳ android.database.sqlite.SQLiteClosable
Known Direct Subclasses
Known Indirect Subclasses


An object created from a SQLiteDatabase that can be closed. This class implements a primitive reference counting scheme for database objects.

Summary

Public constructors

SQLiteClosable()

Public methods

void acquireReference()

Acquires a reference to the object.

void close()

Releases a reference to the object, closing the object if the last reference was released.

void releaseReference()

Releases a reference to the object, closing the object if the last reference was released.

void releaseReferenceFromContainer()

This method was deprecated in API level 16. Do not use.

Protected methods

abstract void onAllReferencesReleased()

Called when the last reference to the object was released by a call to releaseReference() or close().

void onAllReferencesReleasedFromContainer()

This method was deprecated in API level 16. Do not use.

Inherited methods

From class java.lang.Object
From interface java.io.Closeable
From interface java.lang.AutoCloseable

Public constructors

SQLiteClosable

Added in API level 1
SQLiteClosable ()

Public methods

acquireReference

Added in API level 1
void acquireReference ()

Acquires a reference to the object.

Throws
IllegalStateException if the last reference to the object has already been released.

close

Added in API level 1
void close ()

Releases a reference to the object, closing the object if the last reference was released. Calling this method is equivalent to calling releaseReference().

See also:

releaseReference

Added in API level 1
void releaseReference ()

Releases a reference to the object, closing the object if the last reference was released.

See also:

releaseReferenceFromContainer

Added in API level 1
void releaseReferenceFromContainer ()

This method was deprecated in API level 16.
Do not use.

Releases a reference to the object that was owned by the container of the object, closing the object if the last reference was released.

See also:

Protected methods

onAllReferencesReleased

Added in API level 1
void onAllReferencesReleased ()

Called when the last reference to the object was released by a call to releaseReference() or close().

onAllReferencesReleasedFromContainer

Added in API level 1
void onAllReferencesReleasedFromContainer ()

This method was deprecated in API level 16.
Do not use.

Called when the last reference to the object was released by a call to releaseReferenceFromContainer().

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.