@@ -255,7 +255,7 @@ public class MongoClient {
255255
256256 let connString = try ConnectionString ( connectionString, options: options)
257257 self . connectionPool = try ConnectionPool ( from: connString, options: options? . tlsOptions)
258- self . operationExecutor = DefaultOperationExecutor (
258+ self . operationExecutor = OperationExecutor (
259259 eventLoopGroup: eventLoopGroup,
260260 threadPoolSize: options? . threadPoolSize ?? MongoClient . defaultThreadPoolSize
261261 )
@@ -350,7 +350,7 @@ public class MongoClient {
350350 session: ClientSession ? = nil
351351 ) -> EventLoopFuture < [ DatabaseSpecification ] > {
352352 let operation = ListDatabasesOperation ( client: self , filter: filter, nameOnly: nil )
353- return self . executeOperationAsync ( operation, session: session) . flatMapThrowing { result in
353+ return self . operationExecutor . execute ( operation, client : self , session: session) . flatMapThrowing { result in
354354 guard case let . specs( dbs) = result else {
355355 throw InternalError ( message: " Invalid result " )
356356 }
@@ -394,7 +394,7 @@ public class MongoClient {
394394 session: ClientSession ? = nil
395395 ) -> EventLoopFuture < [ String ] > {
396396 let operation = ListDatabasesOperation ( client: self , filter: filter, nameOnly: true )
397- return self . executeOperationAsync ( operation, session: session) . flatMapThrowing { result in
397+ return self . operationExecutor . execute ( operation, client : self , session: session) . flatMapThrowing { result in
398398 guard case let . names( names) = result else {
399399 throw InternalError ( message: " Invalid result " )
400400 }
@@ -542,15 +542,6 @@ public class MongoClient {
542542 ) throws -> T . OperationResult {
543543 return try self . operationExecutor. execute ( operation, using: connection, client: self , session: session) . wait ( )
544544 }
545-
546- /// Executes an `Operation` asynchronously using this `MongoClient` and an optionally provided session.
547- internal func executeOperationAsync< T: Operation > (
548- _ operation: T ,
549- using connection: Connection ? = nil ,
550- session: ClientSession ? = nil
551- ) -> EventLoopFuture < T . OperationResult > {
552- return self . operationExecutor. execute ( operation, using: connection, client: self , session: session)
553- }
554545}
555546
556547extension MongoClient : Equatable {
0 commit comments