@@ -276,7 +276,7 @@ static boolean isFileOpen(final String canonicalPath) {
276
276
synchronized (openFiles ) {
277
277
if (!openFiles .contains (canonicalPath )) return false ;
278
278
}
279
- if (openFilesCheckerThread == null || !openFilesCheckerThread .isAlive ()) {
279
+ if (openFilesCheckerThread == null || !openFilesCheckerThread .isAlive ()) {
280
280
// Use a thread to avoid finalizers that block us
281
281
openFilesCheckerThread = new Thread () {
282
282
@ Override
@@ -576,10 +576,19 @@ public static boolean deleteAllFiles(@Nullable File baseDirectoryOrNull, @Nullab
576
576
}
577
577
578
578
/**
579
- * Removes all objects from all boxes, e.g. deletes all database content.
580
- *
581
- * Internally reads the current schema, drops all database content,
582
- * then restores the schema in a single transaction.
579
+ * Removes all objects from all types ("boxes"), e.g. deletes all database content
580
+ * (excluding meta data like the data model).
581
+ * This typically performs very quickly (e.g. faster than {@link Box#removeAll()}).
582
+ * <p>
583
+ * Note that this does not reclaim disk space: the already reserved space for the DB file(s) is used in the future
584
+ * resulting in better performance because no/less disk allocation has to be done.
585
+ * <p>
586
+ * If you want to reclaim disk space, delete the DB file(s) instead:
587
+ * <ul>
588
+ * <li>{@link #close()} the BoxStore (and ensure that no thread access it)</li>
589
+ * <li>{@link #deleteAllFiles()} of the BoxStore</li>
590
+ * <li>Open a new BoxStore</li>
591
+ * </ul>
583
592
*/
584
593
public void removeAllObjects () {
585
594
nativeDropAllData (handle );
@@ -1013,7 +1022,7 @@ long panicModeRemoveAllObjects(int entityId) {
1013
1022
* 3) you pass the native store pointer to your native code (e.g. via JNI)<br>
1014
1023
* 4) your native code calls obx_store_wrap() with the native store pointer to get a OBX_store pointer<br>
1015
1024
* 5) Using the OBX_store pointer, you can use the C API.
1016
- *
1025
+ * <p>
1017
1026
* Note: Once you {@link #close()} this BoxStore, do not use it from the C API.
1018
1027
*/
1019
1028
public long getNativeStore () {
0 commit comments