use of com.mongodb.internal.binding.SessionBinding in project mongo-java-driver by mongodb.
the class ClusterFixture method getBinding.
private static ReadWriteBinding getBinding(final Cluster cluster, final ReadPreference readPreference) {
if (!bindingMap.containsKey(readPreference)) {
ReadWriteBinding binding = new ClusterBinding(cluster, readPreference, ReadConcern.DEFAULT, getServerApi(), IgnorableRequestContext.INSTANCE);
if (serverVersionAtLeast(3, 6)) {
binding = new SessionBinding(binding);
}
bindingMap.put(readPreference, binding);
}
return bindingMap.get(readPreference);
}
Aggregations