File tree Expand file tree Collapse file tree
objectbox-java/src/main/java/io/objectbox/sync Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ public final class SyncBuilder {
6161
6262 @ Nullable
6363 String [] trustedCertPaths ;
64+ int flags ;
6465 boolean uncommittedAcks ;
6566
6667 RequestUpdatesMode requestUpdatesMode = RequestUpdatesMode .AUTO ;
@@ -168,6 +169,16 @@ public SyncBuilder trustedCertificates(String[] paths) {
168169 return this ;
169170 }
170171
172+ /**
173+ * Sets bit flags to adjust Sync behavior, like additional logging.
174+ *
175+ * @param flags One or multiple {@link SyncFlags}, combined with bitwise or.
176+ */
177+ public SyncBuilder flags (int flags ) {
178+ this .flags = flags ;
179+ return this ;
180+ }
181+
171182 /**
172183 * Configure automatic sync updates from the server.
173184 * If automatic sync updates are turned off, they will need to be requested using the sync client.
Original file line number Diff line number Diff line change @@ -83,6 +83,11 @@ public final class SyncClientImpl implements SyncClient {
8383 nativeSyncOptAddCertPath (optHandle , certPath );
8484 }
8585 }
86+
87+ // Add Sync flags if set
88+ if (builder .flags != 0 ) {
89+ nativeSyncOptFlags (optHandle , builder .flags );
90+ }
8691 } catch (Exception e ) {
8792 // Free the options if any option method call failed (like due to invalid arguments)
8893 nativeSyncOptFree (optHandle );
You can’t perform that action at this time.
0 commit comments