File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
src/main/java/com/arangodb Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ public class ArangoConfigure {
95
95
96
96
boolean staleConnectionCheck = false ;
97
97
98
+ /**
99
+ * the default ArangoDB cursor batch size
100
+ */
101
+ private int batchSize = 20 ;
102
+
98
103
BatchHttpManager httpManager ;
99
104
100
105
public ArangoConfigure () {
@@ -237,6 +242,11 @@ public void loadProperties(String propertyPath) {
237
242
setStaleConnectionCheck (Boolean .parseBoolean (staleConnectionCheck ));
238
243
}
239
244
245
+ String batchSize = prop .getProperty ("batchSize" );
246
+ if (batchSize != null ) {
247
+ setBatchSize (Integer .parseInt (batchSize ));
248
+ }
249
+
240
250
}
241
251
} catch (IOException e ) {
242
252
logger .warn ("load property error" , e );
@@ -567,4 +577,12 @@ public void setConnectRetryWait(int connectRetryWait) {
567
577
this .connectRetryWait = connectRetryWait ;
568
578
}
569
579
580
+ public int getBatchSize () {
581
+ return batchSize ;
582
+ }
583
+
584
+ public void setBatchSize (int batchSize ) {
585
+ this .batchSize = batchSize ;
586
+ }
587
+
570
588
}
Original file line number Diff line number Diff line change 31
31
import com .arangodb .entity .BatchResponseEntity ;
32
32
import com .arangodb .entity .BooleanResultEntity ;
33
33
import com .arangodb .entity .CollectionEntity ;
34
+ import com .arangodb .entity .CollectionKeyOption ;
34
35
import com .arangodb .entity .CollectionOptions ;
35
36
import com .arangodb .entity .CollectionsEntity ;
36
37
import com .arangodb .entity .CursorEntity ;
@@ -2307,7 +2308,7 @@ public <T> CursorEntity<T> executeCursorEntityQuery(
2307
2308
* @return default AqlQueryOptions object
2308
2309
*/
2309
2310
public AqlQueryOptions getDefaultAqlQueryOptions () {
2310
- return new AqlQueryOptions ().setBatchSize (20 ).setCount (false ).setFullCount (false );
2311
+ return new AqlQueryOptions ().setBatchSize (configure . getBatchSize () ).setCount (false ).setFullCount (false );
2311
2312
}
2312
2313
2313
2314
/**
You can’t perform that action at this time.
0 commit comments