Java 类com.mongodb.client.MongoDriverInformation 实例源码
项目:mongo-java-driver-rx
文件:MongoClients.java
private static MongoDriverInformation getMongoDriverInformation(final MongoDriverInformation mongoDriverInformation) {
if (mongoDriverInformation == null) {
return DEFAULT_DRIVER_INFORMATION;
} else {
return MongoDriverInformation.builder(mongoDriverInformation)
.driverName(DRIVER_NAME)
.driverVersion(DRIVER_VERSION).build();
}
}
项目:mongo-java-driver-reactivestreams
文件:MongoClients.java
private static MongoDriverInformation getMongoDriverInformation(final MongoDriverInformation mongoDriverInformation) {
if (mongoDriverInformation == null) {
return DEFAULT_DRIVER_INFORMATION;
} else {
return MongoDriverInformation.builder(mongoDriverInformation)
.driverName(DRIVER_NAME)
.driverVersion(DRIVER_VERSION).build();
}
}
项目:ibm-performance-monitor
文件:ProfiledOverrideMongoClient.java
/**
* Creates a Mongo described by a URI.
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param uri the URI
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @throws MongoException if theres a failure
* @since 3.4
*/
public ProfiledOverrideMongoClient(final MongoClientURI uri, final MongoDriverInformation mongoDriverInformation) {
super(uri, mongoDriverInformation);
}
项目:ibm-performance-monitor
文件:ProfiledOverrideMongoClient.java
/**
* Creates a MongoClient to a single node using a given ServerAddress.
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param addr the database address
* @param credentialsList the list of credentials used to authenticate all connections
* @param options default options
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @see com.mongodb.ServerAddress
* @since 3.4
*/
public ProfiledOverrideMongoClient(final ServerAddress addr, final List<MongoCredential> credentialsList, final MongoClientOptions options,
final MongoDriverInformation mongoDriverInformation) {
super(addr, credentialsList, options, mongoDriverInformation);
}
项目:ibm-performance-monitor
文件:ProfiledOverrideMongoClient.java
/**
* Creates a MongoClient
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param seeds Put as many servers as you can in the list and the system will figure out the rest. This can either be a list of mongod
* servers in the same replica set or a list of mongos servers in the same sharded cluster.
* @param credentialsList the list of credentials used to authenticate all connections
* @param options the options
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @since 3.4
*/
public ProfiledOverrideMongoClient(final List<ServerAddress> seeds, final List<MongoCredential> credentialsList, final MongoClientOptions options,
final MongoDriverInformation mongoDriverInformation) {
super(seeds, credentialsList, options, mongoDriverInformation);
}
项目:mongo-java-driver-rx
文件:MongoClients.java
/**
* Create a new client with the given connection string.
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param connectionString the settings
* @param observableAdapter the {@link ObservableAdapter} to adapt all {@code Observables}.
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @return the client
* @since 1.3
*/
public static MongoClient create(final ConnectionString connectionString, final ObservableAdapter observableAdapter,
final MongoDriverInformation mongoDriverInformation) {
return create(com.mongodb.async.client.MongoClients.create(connectionString, getMongoDriverInformation(mongoDriverInformation)),
observableAdapter);
}
项目:mongo-java-driver-rx
文件:MongoClients.java
/**
* Creates a new client with the given client settings.
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param settings the settings
* @param observableAdapter the {@link ObservableAdapter} to adapt all {@code Observables}.
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @return the client
* @since 1.3
*/
public static MongoClient create(final MongoClientSettings settings, final ObservableAdapter observableAdapter,
final MongoDriverInformation mongoDriverInformation) {
return create(com.mongodb.async.client.MongoClients.create(settings, getMongoDriverInformation(mongoDriverInformation)),
observableAdapter);
}
项目:mongo-java-driver-reactivestreams
文件:MongoClients.java
/**
* Create a new client with the given connection string.
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param connectionString the settings
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @return the client
* @since 1.3
*/
public static MongoClient create(final ConnectionString connectionString, final MongoDriverInformation mongoDriverInformation) {
return create(com.mongodb.async.client.MongoClients.create(connectionString, getMongoDriverInformation(mongoDriverInformation)));
}
项目:mongo-java-driver-reactivestreams
文件:MongoClients.java
/**
* Creates a new client with the given client settings.
*
* <p>Note: Intended for driver and library authors to associate extra driver metadata with the connections.</p>
*
* @param settings the settings
* @param mongoDriverInformation any driver information to associate with the MongoClient
* @return the client
* @since 1.3
*/
public static MongoClient create(final MongoClientSettings settings, final MongoDriverInformation mongoDriverInformation) {
return create(com.mongodb.async.client.MongoClients.create(settings, getMongoDriverInformation(mongoDriverInformation)));
}