BlobStoreManager.Session.Commit(IExecutor, IConsumer) 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.
Commit the file that was written so far to this session to the blob store maintained by the system.
[Android.Runtime.Register("commit", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetCommit_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=30)]
public virtual void Commit (Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer resultCallback);
[<Android.Runtime.Register("commit", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetCommit_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=30)>]
abstract member Commit : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.Commit : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
Parameters
- executor
- IExecutor
the executor on which result callback will be invoked.
- resultCallback
- IConsumer
a callback to receive the commit result. when the result is
0
, it indicates success. Otherwise, failure.
- Attributes
Remarks
Commit the file that was written so far to this session to the blob store maintained by the system.
Once this method is called, the session is finalized and no additional mutations can be performed on the session. If the device reboots before the session has been finalized, you may commit the session again.
Note that this commit operation will fail if the hash of the data written so far to this session does not match with the one used for BlobHandle#createWithSha256(byte[], CharSequence, long, String)
BlobHandle} associated with this session.
Committing the same data more than once will result in replacing the corresponding access mode (via calling one of #allowPackageAccess(String, byte[])
, #allowSameSignatureAccess()
, etc) with the latest one.
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.