public interface CompactOnLaunchCallback
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)
.
Modifier and Type | Method and Description |
---|---|
boolean |
shouldCompact(long totalBytes,
long usedBytes)
This method determines if the Realm file should be compacted before opened and returned to the user.
|
boolean shouldCompact(long totalBytes, long usedBytes)
totalBytes
- the total file size (data + free space).usedBytes
- the total bytes used by data in the file.