語言

AppSearchSession.RemoveBlob 方法

定義

移除 AppSearch 中的 blob 資料。

[Android.Runtime.Register("removeBlob", "(Ljava/util/Set;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=36)]
public void RemoveBlob(System.Collections.Generic.ICollection<Android.App.AppSearch.AppSearchBlobHandle> handles, Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("removeBlob", "(Ljava/util/Set;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=36)>]
member this.RemoveBlob : System.Collections.Generic.ICollection<Android.App.AppSearch.AppSearchBlobHandle> * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

參數

handles
ICollection<AppSearchBlobHandle>

就是 AppSearchBlobHandle標示斑點的 s。

executor
IExecutor

執行人,用以啟動回撥。

callback
IConsumer

回撥以接收 CommitBlobResponse。

屬性

備註

移除 AppSearch 中的 blob 資料。

呼叫結束後,blob 資料會立即被移除,無法恢復。 它無法透過 #openBlobForRead存取。 #openBlobForWrite 可以重新開啟並重寫它。

此 API 可用來移除待處理的 blob 資料及已提交的 blob 資料。

移除一個已提交但仍被文件引用的資料,會讓這些文件失去可讀的 blob 內容。 強烈建議讓 AppSearch 來控制 blob 資料的生命週期。 AppSearch 會自動回收孤立且待處理的 blob 資料。 預設回收待處理和孤兒 blob 檔案的時間是 1 週。 如果沒有 GenericDocument 人引用 blob 檔案,它會被視為孤兒檔案。 如果你想移除已提交的 blob 資料,應該先移除參考文件。

Java 文件 android.app.appsearch.AppSearchSession.removeBlob(java.util.Set<android.app.appsearch.AppSearchBlobHandle>, java.util.concurrent.Executor, java.util.function.Consumer<android.app.appsearch.AppSearchResult<android.app.appsearch.RemoveBlobResponse>>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於