public class KMongo
Main object used to create a MongoClient instance.
public static KMongo INSTANCE
Main object used to create a MongoClient instance.
@NotNull public com.mongodb.client.MongoClient createClient()
Creates an instance based on a (single) mongodb node (localhost, default port).
@NotNull
public com.mongodb.client.MongoClient createClient(@NotNull
java.lang.String connectionString)
Creates a Mongo instance.
connectionString - the connection string@NotNull
public com.mongodb.client.MongoClient createClient(@NotNull
com.mongodb.ConnectionString connectionString)
Creates a Mongo described by a URI. If only one address is used it will only connect to that node, otherwise it will discover all nodes.
connectionString - the connection uri@NotNull
public com.mongodb.client.MongoClient createClient(@NotNull
com.mongodb.MongoClientSettings settings)
Creates a Mongo described by a URI. If only one address is used it will only connect to that node, otherwise it will discover all nodes.
settings - the settings