You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The class BoxStore offers the following methods to perform explicit transactions:
runInTx: Runs the given runnable inside a transaction.
runInReadTx: Runs the given runnable inside a read(-only) transaction. Unlike write transactions, multiple read transactions can run at the same time.
runInTxAsync: Runs the given Runnable as a transaction in a separate thread. Once the transaction completes the given callback is called (callback may be null).
callInTx: Like runInTx(Runnable), but allows returning a value and throwing an exception.
But I found little confused for runInTxAsync implementation. Any good example about how to implementation those transaction ?
The text was updated successfully, but these errors were encountered:
I suppose looking at the implementation of BoxStore.runInTxAsync can clear things up for you? It's basically the same as runInTx, except the Runnable is submitted to a thread pool and you get a callback once the transaction is done.
From this documentation, there are several transaction in ObjectBox
http://objectbox.io/documentation/transactions/
But I found little confused for runInTxAsync implementation. Any good example about how to implementation those transaction ?
The text was updated successfully, but these errors were encountered: