Interface CompactOnLaunchCallback
Atlas Device SDK は非推奨です。 詳細については、「非推奨 」のページを参照してください。
io.realm
This interface is used to determine if a Realm file should be compacted the first time the file is opened and before the instance is returned.Note that compacting a file can take a while, so compacting should generally only be done on a background thread or when used in combination with Realm.getInstanceAsync(RealmConfiguration, io.realm.Realm.Callback) .
メソッドの概要
修飾子と型 | メソッドと説明 |
---|---|
パブリックブール値 | このメソッドは、Realm ファイルを開いてユーザーに返す前に圧縮する必要があるかどうかを決定します。 |
メソッドの詳細
ShouldCompact
このメソッドは、Realm ファイルを開いてユーザーに返す前に圧縮する必要があるかどうかを決定します。 合計ファイルサイズ(データ + 空き領域)とファイル内のデータによって使用されるバイト数が渡されます。 パラメーター
戻り値 {code true} は、ファイルを圧縮する試行を実行する必要があることを示します。 それ以外の場合、圧縮はスキップされます。 |