Skip to content

Commit 3a8c7f7

Browse files
committed
increased default max db size to 1 GB DEFAULT_MAX_DB_SIZE_KBYTE
1 parent 65c6355 commit 3a8c7f7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

objectbox-java/src/main/java/io/objectbox/BoxStoreBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* <ol>
3838
* <li>Name/location of DB: use {@link #name(String)}/{@link #baseDirectory}/{@link #androidContext(Object)}
3939
* OR {@link #directory(File)}(default: name "objectbox)</li>
40-
* <li>Max DB size: see {@link #maxSizeInKByte} (default: 512 MB)</li>
40+
* <li>Max DB size: see {@link #maxSizeInKByte} (default: 1 GB)</li>
4141
* <li>Max readers: see {@link #maxReaders(int)} (default: 126)</li>
4242
* </ol>
4343
*/
@@ -47,7 +47,7 @@ public class BoxStoreBuilder {
4747
public static final String DEFAULT_NAME = "objectbox";
4848

4949
/** The default maximum size the DB can grow to, which can be overwritten using {@link #maxSizeInKByte}. */
50-
public static final int DEFAULT_MAX_DB_SIZE_KBYTE = 512 * 1024;
50+
public static final int DEFAULT_MAX_DB_SIZE_KBYTE = 1024 * 1024;
5151

5252
final byte[] model;
5353

@@ -60,7 +60,7 @@ public class BoxStoreBuilder {
6060
/** Ignored by BoxStore */
6161
private String name;
6262

63-
// 512 MB
63+
/** Defaults to {@link #DEFAULT_MAX_DB_SIZE_KBYTE}. */
6464
long maxSizeInKByte = DEFAULT_MAX_DB_SIZE_KBYTE;
6565

6666
ModelUpdate modelUpdate;
@@ -218,10 +218,10 @@ BoxStoreBuilder modelUpdate(ModelUpdate modelUpdate) {
218218

219219
/**
220220
* Sets the maximum size the database file can grow to.
221-
* By default this is 512 MB, which should be sufficient for most applications.
221+
* By default this is 1 GB, which should be sufficient for most applications.
222222
* <p>
223223
* In general, a maximum size prevents the DB from growing indefinitely when something goes wrong
224-
* (for example you insert data in an infinite look).
224+
* (for example you insert data in an infinite loop).
225225
*
226226
* @param maxSizeInKByte
227227
*/

0 commit comments

Comments
 (0)