Skip to content

Commit 9a8cde5

Browse files
FIXME Add fileMode option.
1 parent 6d121fc commit 9a8cde5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ private byte[] buildFlatStoreOptions(BoxStoreBuilder builder, String canonicalPa
281281
// ...then build options.
282282
FlatStoreOptions.addDirectoryPath(fbb, directoryPathOffset);
283283
FlatStoreOptions.addMaxDbSizeInKByte(fbb, builder.maxSizeInKByte);
284+
FlatStoreOptions.addFileMode(fbb, builder.fileMode);
284285
FlatStoreOptions.addMaxReaders(fbb, builder.maxReaders);
285286
int validateOnOpenMode = builder.validateOnOpenMode;
286287
if (validateOnOpenMode != 0) {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ public class BoxStoreBuilder {
8888

8989
boolean debugRelations;
9090

91+
long fileMode;
92+
9193
int maxReaders;
9294

9395
int queryAttempts;
@@ -266,6 +268,12 @@ private static File getAndroidFilesDir(Object context) {
266268
return filesDir;
267269
}
268270

271+
// TODO Docs, validation.
272+
public BoxStoreBuilder fileMode(long mode) {
273+
this.fileMode = mode;
274+
return this;
275+
}
276+
269277
/**
270278
* Sets the maximum number of concurrent readers. For most applications, the default is fine (> 100 readers).
271279
* <p>

0 commit comments

Comments
 (0)