3434class QueryBatchCursor <T > implements BatchCursor <T > {
3535 private final MongoNamespace namespace ;
3636 private final int limit ;
37- private final ServerAddress serverAddress ;
3837 private final Decoder <T > decoder ;
3938 private final ConnectionSource connectionSource ;
4039 private int batchSize ;
@@ -45,22 +44,16 @@ class QueryBatchCursor<T> implements BatchCursor<T> {
4544 private boolean closed ;
4645
4746 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 );
5049 }
5150
5251 QueryBatchCursor (final QueryResult <T > firstQueryResult , final int limit , final int batchSize ,
5352 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 ) {
5953 this .namespace = firstQueryResult .getNamespace ();
6054 this .limit = limit ;
6155 this .batchSize = batchSize ;
6256 this .decoder = notNull ("decoder" , decoder );
63- this .serverAddress = notNull ("serverAddress" , serverAddress );
6457 if (firstQueryResult .getCursor () != null ) {
6558 notNull ("connectionSource" , connectionSource );
6659 }
0 commit comments