Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/ /
io.realm

Class DefaultCompactOnLaunchCallback

java.lang.Object
io.realm.DefaultCompactOnLaunchCallback

Implemented interfaces:

Implementación predeterminada para determinar si un archivo debe compactarse. Esta implementación solo se activa si el archivo supera los 50 MB y se puede recuperar más del 50 %.

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