3434import io .objectbox .annotation .apihint .Experimental ;
3535import io .objectbox .annotation .apihint .Internal ;
3636import io .objectbox .exception .DbException ;
37+ import io .objectbox .exception .DbFullException ;
38+ import io .objectbox .exception .DbMaxDataSizeExceededException ;
3739import io .objectbox .flatbuffers .FlatBufferBuilder ;
3840import io .objectbox .ideasonly .ModelUpdate ;
3941import io .objectbox .model .FlatStoreOptions ;
@@ -333,10 +335,13 @@ BoxStoreBuilder modelUpdate(ModelUpdate modelUpdate) {
333335
334336 /**
335337 * Sets the maximum size the database file can grow to.
336- * By default this is 1 GB, which should be sufficient for most applications .
338+ * When applying a transaction (e.g. putting an object) would exceed it a {@link DbFullException} is thrown .
337339 * <p>
338- * In general, a maximum size prevents the DB from growing indefinitely when something goes wrong
339- * (for example you insert data in an infinite loop).
340+ * By default, this is 1 GB, which should be sufficient for most applications.
341+ * In general, a maximum size prevents the database from growing indefinitely when something goes wrong
342+ * (for example data is put in an infinite loop).
343+ * <p>
344+ * This value can be changed, so increased or also decreased, each time when opening a store.
340345 */
341346 public BoxStoreBuilder maxSizeInKByte (long maxSizeInKByte ) {
342347 if (maxSizeInKByte <= maxDataSizeInKByte ) {
@@ -349,13 +354,17 @@ public BoxStoreBuilder maxSizeInKByte(long maxSizeInKByte) {
349354 /**
350355 * This API is experimental and may change or be removed in future releases.
351356 * <p>
352- * Sets the maximum size the data stored in the database can grow to. Must be below {@link #maxSizeInKByte(long)}.
357+ * Sets the maximum size the data stored in the database can grow to.
358+ * When applying a transaction (e.g. putting an object) would exceed it a {@link DbMaxDataSizeExceededException}
359+ * is thrown.
360+ * <p>
361+ * Must be below {@link #maxSizeInKByte(long)}.
353362 * <p>
354363 * Different from {@link #maxSizeInKByte(long)} this only counts bytes stored in objects, excluding system and
355364 * metadata. However, it is more involved than database size tracking, e.g. it stores an internal counter.
356365 * Only use this if a stricter, more accurate limit is required.
357366 * <p>
358- * When the data limit is reached data can be removed to get below the limit again (assuming the database size limit
367+ * When the data limit is reached, data can be removed to get below the limit again (assuming the database size limit
359368 * is not also reached).
360369 */
361370 @ Experimental
@@ -455,7 +464,7 @@ public BoxStoreBuilder debugRelations() {
455464 * {@link io.objectbox.exception.DbException} are thrown during query execution).
456465 *
457466 * @param queryAttempts number of attempts a query find operation will be executed before failing.
458- * Recommended values are in the range of 2 to 5, e.g. a value of 3 as a starting point.
467+ * Recommended values are in the range of 2 to 5, e.g. a value of 3 as a starting point.
459468 */
460469 @ Experimental
461470 public BoxStoreBuilder queryAttempts (int queryAttempts ) {
0 commit comments