* @param port The port.
* @param database The database name.
* @throws Exception If an error occurred while trying to connect.
*/
public MongoConnection(String host, int port, String database) throws Exception {
MongoClientOptions options = new MongoClientOptions.Builder().
threadsAllowedToBlockForConnectionMultiplier(100).build();
ServerAddress serverAddress = new ServerAddress(host, port);
mongo = new MongoClient(serverAddress, options);
db = mongo.getDB(database);
}