package com.mongodb.internal.connection;
import com.mongodb.connection.AsyncConnection;
import com.mongodb.connection.ClusterConnectionMode;
import com.mongodb.connection.Connection;
class DefaultConnectionFactory implements ConnectionFactory {
@Override
public Connection create(final InternalConnection internalConnection, final ProtocolExecutor executor,
final ClusterConnectionMode clusterConnectionMode) {
return new DefaultServerConnection(internalConnection, executor, clusterConnectionMode);
}
@Override
public AsyncConnection createAsync(final InternalConnection internalConnection, final ProtocolExecutor executor,
final ClusterConnectionMode clusterConnectionMode) {
return new DefaultServerConnection(internalConnection, executor, clusterConnectionMode);
}
}