public class DefaultCompactOnLaunchCallback extends Object implements CompactOnLaunchCallback
Constructor and Description |
---|
DefaultCompactOnLaunchCallback() |
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.
|
public boolean shouldCompact(long totalBytes, long usedBytes)
CompactOnLaunchCallback
shouldCompact
in interface CompactOnLaunchCallback
totalBytes
- the total file size (data + free space).usedBytes
- the total bytes used by data in the file.