use of com.mongodb.internal.binding.AsyncSessionBinding in project mongo-java-driver by mongodb.
the class ClusterFixture method getAsyncBinding.
public static AsyncReadWriteBinding getAsyncBinding(final Cluster cluster, final ReadPreference readPreference) {
if (!asyncBindingMap.containsKey(readPreference)) {
AsyncReadWriteBinding binding = new AsyncClusterBinding(cluster, readPreference, ReadConcern.DEFAULT, getServerApi(), IgnorableRequestContext.INSTANCE);
if (serverVersionAtLeast(3, 6)) {
binding = new AsyncSessionBinding(binding);
}
asyncBindingMap.put(readPreference, binding);
}
return asyncBindingMap.get(readPreference);
}
Aggregations