Class MongoDataSource
- java.lang.Object
-
- io.vertx.mutiny.servicediscovery.types.MongoDataSource
-
public class MongoDataSource extends Object
NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.smallrye.mutiny.vertx.TypeArg<MongoDataSource>__TYPE_ARGstatic StringTYPEstatic StringUNKNOWNUnknown type.
-
Constructor Summary
Constructors Constructor Description MongoDataSource(io.vertx.servicediscovery.types.MongoDataSource delegate)MongoDataSource(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static io.vertx.servicediscovery.RecordcreateRecord(String name, io.vertx.core.json.JsonObject location, io.vertx.core.json.JsonObject metadata)booleanequals(Object o)io.vertx.servicediscovery.types.MongoDataSourcegetDelegate()static io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.mongo.MongoClient>getMongoClient(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.mongo.MongoClient>getMongoClient(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.mongo.MongoClient>getMongoClient(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient.static io.vertx.mutiny.ext.mongo.MongoClientgetMongoClientAndAwait(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)Blocking variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject).static io.vertx.mutiny.ext.mongo.MongoClientgetMongoClientAndAwait(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration)static io.vertx.mutiny.ext.mongo.MongoClientgetMongoClientAndAwait(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)Blocking variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function).static voidgetMongoClientAndForget(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)Variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)that ignores the result of the operation.static voidgetMongoClientAndForget(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration)Variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject)that ignores the result of the operation.static voidgetMongoClientAndForget(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)Variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)that ignores the result of the operation.inthashCode()static MongoDataSourcenewInstance(io.vertx.servicediscovery.types.MongoDataSource arg)StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.smallrye.mutiny.vertx.TypeArg<MongoDataSource> __TYPE_ARG
-
UNKNOWN
public static final String UNKNOWN
Unknown type.- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MongoDataSource
public MongoDataSource(io.vertx.servicediscovery.types.MongoDataSource delegate)
-
MongoDataSource
public MongoDataSource(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.servicediscovery.types.MongoDataSource getDelegate()
-
createRecord
public static io.vertx.servicediscovery.Record createRecord(String name, io.vertx.core.json.JsonObject location, io.vertx.core.json.JsonObject metadata)
- Parameters:
name- the service namelocation- the location of the service (e.g. url, port...)metadata- additional metadata- Returns:
- the created record
-
getMongoClient
@CheckReturnValue public static io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.mongo.MongoClient> getMongoClient(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
discovery- The service discovery instancefilter- The filter, optional- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
getMongoClientAndAwait
public static io.vertx.mutiny.ext.mongo.MongoClient getMongoClientAndAwait(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Blocking variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
discovery- The service discovery instancefilter- The filter, optional- Returns:
- the MongoClient instance produced by the operation.
-
getMongoClientAndForget
public static void getMongoClientAndForget(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)that ignores the result of the operation.This method subscribes on the result of
getMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)but you don't need to compose it with other operations.- Parameters:
discovery- The service discovery instancefilter- The filter, optional
-
getMongoClient
@CheckReturnValue public static io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.mongo.MongoClient> getMongoClient(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
discovery- The service discovery instancefilter- The filter- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
getMongoClientAndAwait
public static io.vertx.mutiny.ext.mongo.MongoClient getMongoClientAndAwait(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Blocking variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
discovery- The service discovery instancefilter- The filter- Returns:
- the MongoClient instance produced by the operation.
-
getMongoClientAndForget
public static void getMongoClientAndForget(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)that ignores the result of the operation.This method subscribes on the result of
getMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)but you don't need to compose it with other operations.- Parameters:
discovery- The service discovery instancefilter- The filter
-
getMongoClient
@CheckReturnValue public static io.smallrye.mutiny.Uni<io.vertx.mutiny.ext.mongo.MongoClient> getMongoClient(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration)
Convenient method that looks for a Mongo datasource source and provides the configuredMongoClient. The async result is marked as failed is there are no matching services, or if the lookup fails.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- the consumer configuration- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
getMongoClientAndAwait
public static io.vertx.mutiny.ext.mongo.MongoClient getMongoClientAndAwait(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration)
Blocking variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- the consumer configuration- Returns:
- the MongoClient instance produced by the operation.
-
getMongoClientAndForget
public static void getMongoClientAndForget(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter, io.vertx.core.json.JsonObject consumerConfiguration)
Variant ofgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject)that ignores the result of the operation.This method subscribes on the result of
getMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromgetMongoClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject)but you don't need to compose it with other operations.- Parameters:
discovery- The service discovery instancefilter- The filter, optionalconsumerConfiguration- the consumer configuration
-
newInstance
public static MongoDataSource newInstance(io.vertx.servicediscovery.types.MongoDataSource arg)
-
-