SQLiteDatabase.BeginTransactionWithListenerNonExclusive Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Begins a transaction in IMMEDIATE mode.
[Android.Runtime.Register("beginTransactionWithListenerNonExclusive", "(Landroid/database/sqlite/SQLiteTransactionListener;)V", "GetBeginTransactionWithListenerNonExclusive_Landroid_database_sqlite_SQLiteTransactionListener_Handler")]
public virtual void BeginTransactionWithListenerNonExclusive (Android.Database.Sqlite.ISQLiteTransactionListener? transactionListener);
[<Android.Runtime.Register("beginTransactionWithListenerNonExclusive", "(Landroid/database/sqlite/SQLiteTransactionListener;)V", "GetBeginTransactionWithListenerNonExclusive_Landroid_database_sqlite_SQLiteTransactionListener_Handler")>]
abstract member BeginTransactionWithListenerNonExclusive : Android.Database.Sqlite.ISQLiteTransactionListener -> unit
override this.BeginTransactionWithListenerNonExclusive : Android.Database.Sqlite.ISQLiteTransactionListener -> unit
Parameters
- transactionListener
- ISQLiteTransactionListener
listener that should be notified when the
transaction begins, commits, or is rolled back, either
explicitly or by a call to #yieldIfContendedSafely
.
- Attributes
Remarks
Begins a transaction in IMMEDIATE mode. Transactions can be nested. When the outer transaction is ended all of the work done in that transaction and all of the nested transactions will be committed or rolled back. The changes will be rolled back if any transaction is ended without being marked as clean (by calling setTransactionSuccessful). Otherwise they will be committed.
Here is the standard idiom for transactions:
db.beginTransactionWithListenerNonExclusive(listener);
try {
...
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.