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 {
9595
9696 boolean staleConnectionCheck = false ;
9797
98+ /**
99+ * the default ArangoDB cursor batch size
100+ */
101+ private int batchSize = 20 ;
102+
98103 BatchHttpManager httpManager ;
99104
100105 public ArangoConfigure () {
@@ -237,6 +242,11 @@ public void loadProperties(String propertyPath) {
237242 setStaleConnectionCheck (Boolean .parseBoolean (staleConnectionCheck ));
238243 }
239244
245+ String batchSize = prop .getProperty ("batchSize" );
246+ if (batchSize != null ) {
247+ setBatchSize (Integer .parseInt (batchSize ));
248+ }
249+
240250 }
241251 } catch (IOException e ) {
242252 logger .warn ("load property error" , e );
@@ -567,4 +577,12 @@ public void setConnectRetryWait(int connectRetryWait) {
567577 this .connectRetryWait = connectRetryWait ;
568578 }
569579
580+ public int getBatchSize () {
581+ return batchSize ;
582+ }
583+
584+ public void setBatchSize (int batchSize ) {
585+ this .batchSize = batchSize ;
586+ }
587+
570588}
Original file line number Diff line number Diff line change 3131import com .arangodb .entity .BatchResponseEntity ;
3232import com .arangodb .entity .BooleanResultEntity ;
3333import com .arangodb .entity .CollectionEntity ;
34+ import com .arangodb .entity .CollectionKeyOption ;
3435import com .arangodb .entity .CollectionOptions ;
3536import com .arangodb .entity .CollectionsEntity ;
3637import com .arangodb .entity .CursorEntity ;
@@ -2307,7 +2308,7 @@ public <T> CursorEntity<T> executeCursorEntityQuery(
23072308 * @return default AqlQueryOptions object
23082309 */
23092310 public AqlQueryOptions getDefaultAqlQueryOptions () {
2310- return new AqlQueryOptions ().setBatchSize (20 ).setCount (false ).setFullCount (false );
2311+ return new AqlQueryOptions ().setBatchSize (configure . getBatchSize () ).setCount (false ).setFullCount (false );
23112312 }
23122313
23132314 /**
You can’t perform that action at this time.
0 commit comments