List of usage examples for com.mongodb MongoClientOptions.Builder dbDecoderFactory
DBDecoderFactory dbDecoderFactory
To view the source code for com.mongodb MongoClientOptions.Builder dbDecoderFactory.
Click Source Link
From source file:org.fastmongo.odm.client.MongoClientFactory.java
License:Apache License
public MongoClient createMongoClient() { MongoClientOptions.Builder options = MongoClientOptions.builder(); if (useBsonDecoder) { options.dbDecoderFactory(BsonDbDecoderFactory.INSTANCE); }/* w w w.ja v a2 s . co m*/ MongoClientURI clientUri = new MongoClientURI(this.uri, options); try { return new MongoClient(clientUri); } catch (UnknownHostException e) { throw new RuntimeException("Can't create MongoClient with uri = " + clientUri, e); } }