Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
Click here >
Docs Menu
Docs Home
/ /
io.realm

Class DefaultCompactOnLaunchCallback

java.lang.Object
io.realm.DefaultCompactOnLaunchCallback

Implemented interfaces:

The default implementation for determining if a file should be compacted or not. This implementation will only trigger if the file is above 50 MB and more than 50% can be reclaimed.

Constructor and Description
Modificador y Tipo
Método y descripción

public booleano

long totalBytes,
long usedBytes
)

This method determines if the Realm file should be compacted before opened and returned to the user.

  • Métodos heredados de la clase java.lang.Object: getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

public boolean shouldCompact (
long totalBytes,
long usedBytes
)

Este método determina si el archivo Realm se debe compactar antes de abrirlo y devolverlo al usuario. Se le pasa el tamaño total del archivo (datos + espacio libre) y los bytes utilizados por los datos en el archivo.

Devuelve

{code true} to indicate an attempt to compact the file should be made. Otherwise, the compaction will be skipped.

Volver

CompactOnLaunchCallback

En esta página