33
33
import com .marklogic .client .io .StringHandle ;
34
34
import com .marklogic .client .io .marker .StructureWriteHandle ;
35
35
import com .marklogic .client .query .RawQueryDefinition ;
36
+ import com .marklogic .client .query .SearchQueryDefinition ;
36
37
import org .slf4j .Logger ;
37
38
import org .slf4j .LoggerFactory ;
38
39
39
40
import com .marklogic .client .DatabaseClient ;
40
41
import com .marklogic .client .ResourceNotFoundException ;
41
- import com .marklogic .client .query .QueryDefinition ;
42
42
import com .marklogic .client .impl .QueryManagerImpl ;
43
43
import com .marklogic .client .impl .UrisHandle ;
44
44
59
59
public class QueryBatcherImpl extends BatcherImpl implements QueryBatcher {
60
60
private static Logger logger = LoggerFactory .getLogger (QueryBatcherImpl .class );
61
61
private String queryMethod ;
62
- private QueryDefinition query ;
63
- private QueryDefinition originalQuery ;
62
+ private SearchQueryDefinition query ;
63
+ private SearchQueryDefinition originalQuery ;
64
64
private Boolean filtered ;
65
65
private Iterator <String > iterator ;
66
66
private boolean threadCountSet = false ;
@@ -84,7 +84,7 @@ public class QueryBatcherImpl extends BatcherImpl implements QueryBatcher {
84
84
private long maxBatches = Long .MAX_VALUE ;
85
85
86
86
QueryBatcherImpl (
87
- QueryDefinition originalQuery , DataMovementManager moveMgr , ForestConfiguration forestConfig ,
87
+ SearchQueryDefinition originalQuery , DataMovementManager moveMgr , ForestConfiguration forestConfig ,
88
88
String serializedCtsQuery , Boolean filtered
89
89
) {
90
90
this (moveMgr , forestConfig );
@@ -100,7 +100,7 @@ public class QueryBatcherImpl extends BatcherImpl implements QueryBatcher {
100
100
initQuery (originalQuery );
101
101
}
102
102
}
103
- public QueryBatcherImpl (QueryDefinition query , DataMovementManager moveMgr , ForestConfiguration forestConfig ) {
103
+ public QueryBatcherImpl (SearchQueryDefinition query , DataMovementManager moveMgr , ForestConfiguration forestConfig ) {
104
104
this (moveMgr , forestConfig );
105
105
initQuery (query );
106
106
}
@@ -113,7 +113,7 @@ private QueryBatcherImpl(DataMovementManager moveMgr, ForestConfiguration forest
113
113
withForestConfig (forestConfig );
114
114
withBatchSize (1000 );
115
115
}
116
- private void initQuery (QueryDefinition query ) {
116
+ private void initQuery (SearchQueryDefinition query ) {
117
117
if (query == null ) {
118
118
throw new IllegalArgumentException ("Cannot create QueryBatcher with null query" );
119
119
}
@@ -589,7 +589,7 @@ private class QueryTask implements Runnable {
589
589
private QueryBatcherImpl batcher ;
590
590
private Forest forest ;
591
591
private String queryMethod ;
592
- private QueryDefinition query ;
592
+ private SearchQueryDefinition query ;
593
593
private Boolean filtered ;
594
594
private long forestBatchNum ;
595
595
private long start ;
@@ -599,17 +599,17 @@ private class QueryTask implements Runnable {
599
599
private String nextAfterUri ;
600
600
601
601
QueryTask (DataMovementManager moveMgr , QueryBatcherImpl batcher , Forest forest ,
602
- String queryMethod , QueryDefinition query , Boolean filtered , long forestBatchNum , long start
602
+ String queryMethod , SearchQueryDefinition query , Boolean filtered , long forestBatchNum , long start
603
603
) {
604
604
this (moveMgr , batcher , forest , queryMethod , query , filtered , forestBatchNum , start , null , -1 , true );
605
605
}
606
606
QueryTask (DataMovementManager moveMgr , QueryBatcherImpl batcher , Forest forest ,
607
- String queryMethod , QueryDefinition query , Boolean filtered , long forestBatchNum , long start , String afterUri
607
+ String queryMethod , SearchQueryDefinition query , Boolean filtered , long forestBatchNum , long start , String afterUri
608
608
) {
609
609
this (moveMgr , batcher , forest , queryMethod , query , filtered , forestBatchNum , start , afterUri , -1 , true );
610
610
}
611
611
QueryTask (DataMovementManager moveMgr , QueryBatcherImpl batcher , Forest forest ,
612
- String queryMethod , QueryDefinition query , Boolean filtered , long forestBatchNum , long start , String afterUri ,
612
+ String queryMethod , SearchQueryDefinition query , Boolean filtered , long forestBatchNum , long start , String afterUri ,
613
613
long retryBatchNumber , boolean callFailListeners
614
614
) {
615
615
this .moveMgr = moveMgr ;
0 commit comments