@Plugin(name="MongoDb2", category="Core", printObject=true) @PluginAliases(value="MongoDb") public final class MongoDbProvider extends Object implements NoSqlProvider<MongoDbConnection>
NoSqlProvider
.Modifier and Type | Class and Description |
---|---|
static class |
MongoDbProvider.Builder<B extends MongoDbProvider.Builder<B>> |
Modifier and Type | Method and Description |
---|---|
static MongoDbProvider |
createNoSqlProvider(String collectionName,
String writeConcernConstant,
String writeConcernConstantClassName,
String databaseName,
String server,
String port,
String userName,
String password,
String factoryClassName,
String factoryMethodName)
Deprecated.
in 2.8; use
newBuilder() instead. |
MongoDbConnection |
getConnection() |
static <B extends MongoDbProvider.Builder<B>> |
newBuilder() |
String |
toString() |
@Deprecated public static MongoDbProvider createNoSqlProvider(String collectionName, String writeConcernConstant, String writeConcernConstantClassName, String databaseName, String server, String port, String userName, String password, String factoryClassName, String factoryMethodName)
newBuilder()
instead.collectionName
- The name of the MongoDB collection to which log events should be written.writeConcernConstant
- The WriteConcern
constant to control writing details, defaults to
WriteConcern.ACKNOWLEDGED
.writeConcernConstantClassName
- The name of a class containing the aforementioned static WriteConcern
constant. Defaults to WriteConcern
.databaseName
- The name of the MongoDB database containing the collection to which log events should be
written. Mutually exclusive with factoryClassName&factoryMethodName!=null
.server
- The host name of the MongoDB server, defaults to localhost and mutually exclusive with
factoryClassName&factoryMethodName!=null
.port
- The port the MongoDB server is listening on, defaults to the default MongoDB port and mutually
exclusive with factoryClassName&factoryMethodName!=null
.userName
- The username to authenticate against the MongoDB server with.password
- The password to authenticate against the MongoDB server with.factoryClassName
- A fully qualified class name containing a static factory method capable of returning a
DB
or a MongoClient
.factoryMethodName
- The name of the public static factory method belonging to the aforementioned factory
class.@PluginBuilderFactory public static <B extends MongoDbProvider.Builder<B>> B newBuilder()
public MongoDbConnection getConnection()
getConnection
in interface NoSqlProvider<MongoDbConnection>
public String toString()
toString
in interface NoSqlProvider<MongoDbConnection>
toString
in class Object
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.