34
34
class QueryBatchCursor <T > implements BatchCursor <T > {
35
35
private final MongoNamespace namespace ;
36
36
private final int limit ;
37
- private final ServerAddress serverAddress ;
38
37
private final Decoder <T > decoder ;
39
38
private final ConnectionSource connectionSource ;
40
39
private int batchSize ;
@@ -45,22 +44,16 @@ class QueryBatchCursor<T> implements BatchCursor<T> {
45
44
private boolean closed ;
46
45
47
46
QueryBatchCursor (final QueryResult <T > firstQueryResult , final int limit , final int batchSize ,
48
- final Decoder <T > decoder , final ServerAddress serverAddress ) {
49
- this (firstQueryResult , limit , batchSize , decoder , (ConnectionSource ) null , serverAddress );
47
+ final Decoder <T > decoder ) {
48
+ this (firstQueryResult , limit , batchSize , decoder , (ConnectionSource ) null );
50
49
}
51
50
52
51
QueryBatchCursor (final QueryResult <T > firstQueryResult , final int limit , final int batchSize ,
53
52
final Decoder <T > decoder , final ConnectionSource connectionSource ) {
54
- this (firstQueryResult , limit , batchSize , decoder , connectionSource , connectionSource .getServerDescription ().getAddress ());
55
- }
56
-
57
- QueryBatchCursor (final QueryResult <T > firstQueryResult , final int limit , final int batchSize ,
58
- final Decoder <T > decoder , final ConnectionSource connectionSource , final ServerAddress serverAddress ) {
59
53
this .namespace = firstQueryResult .getNamespace ();
60
54
this .limit = limit ;
61
55
this .batchSize = batchSize ;
62
56
this .decoder = notNull ("decoder" , decoder );
63
- this .serverAddress = notNull ("serverAddress" , serverAddress );
64
57
if (firstQueryResult .getCursor () != null ) {
65
58
notNull ("connectionSource" , connectionSource );
66
59
}
0 commit comments