com.mongodb.reactivestreams.client.ClientSession Java Examples

The following examples show how to use com.mongodb.reactivestreams.client.ClientSession. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<UpdateResult> updateOne(ClientSession clientSession, Bson filter, Bson update,
        UpdateOptions options) {
    return Wrappers.toUni(collection.updateOne(clientSession, filter, update, options));
}
 
Example #2
Source File: ReactiveMongoDatabaseImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<Document> aggregate(ClientSession clientSession, List<? extends Bson> pipeline,
        AggregateOptions options) {
    return Wrappers.toMulti(apply(options, database.aggregate(clientSession, pipeline)));
}
 
Example #3
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<T> aggregate(ClientSession clientSession, List<? extends Bson> pipeline) {
    return Wrappers.toMulti(collection.aggregate(clientSession, pipeline));
}
 
Example #4
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<Document> listDatabases(ClientSession clientSession) {
    return Wrappers.toMulti(client.listDatabases(clientSession));
}
 
Example #5
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Void> dropIndex(ClientSession clientSession, Bson keys) {
    return Wrappers.toUni(collection.dropIndex(clientSession, keys));
}
 
Example #6
Source File: ReactiveMongoDatabaseImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public <T> Uni<T> runCommand(ClientSession clientSession, Bson command, Class<T> clazz) {
    return Wrappers.toUni(database.runCommand(clientSession, command, clazz));
}
 
Example #7
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<DeleteResult> deleteOne(ClientSession clientSession, Bson filter) {
    return Wrappers.toUni(collection.deleteOne(clientSession, filter));
}
 
Example #8
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<DeleteResult> deleteOne(ClientSession clientSession, Bson filter, DeleteOptions options) {
    return Wrappers.toUni(collection.deleteOne(clientSession, filter, options));
}
 
Example #9
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public <T> Multi<ChangeStreamDocument<T>> watch(ClientSession clientSession, List<? extends Bson> pipeline,
        Class<T> clazz, ChangeStreamOptions options) {
    ChangeStreamPublisher<T> publisher = apply(options, client.watch(clientSession, pipeline, clazz));
    return Wrappers.toMulti(publisher);
}
 
Example #10
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<List<String>> createIndexes(ClientSession clientSession, List<IndexModel> indexes,
        CreateIndexOptions createIndexOptions) {
    return Wrappers.toUniOfList(collection.createIndexes(clientSession, indexes, createIndexOptions));
}
 
Example #11
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<BulkWriteResult> bulkWrite(ClientSession clientSession,
        List<? extends WriteModel<? extends T>> requests) {
    return Wrappers.toUni(collection.bulkWrite(clientSession, requests));
}
 
Example #12
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<T> find(ClientSession clientSession) {
    return Wrappers.toMulti(collection.find(clientSession));
}
 
Example #13
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<ClientSession> startSession() {
    return Wrappers.toUni(client.startSession());
}
 
Example #14
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<T> findOneAndUpdate(ClientSession clientSession, Bson filter, Bson update,
        FindOneAndUpdateOptions options) {
    return Wrappers.toUni(collection.findOneAndUpdate(clientSession, filter, update, options));
}
 
Example #15
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Long> countDocuments(ClientSession clientSession, Bson filter) {
    return Wrappers.toUni(collection.countDocuments(clientSession, filter));
}
 
Example #16
Source File: ReactiveMongoDatabaseImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public <T> Multi<ChangeStreamDocument<T>> watch(ClientSession clientSession, List<? extends Bson> pipeline,
        Class<T> clazz, ChangeStreamOptions options) {
    return null;
}
 
Example #17
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Void> renameCollection(ClientSession clientSession, MongoNamespace newCollectionNamespace,
        RenameCollectionOptions options) {
    return Wrappers.toUni(collection.renameCollection(clientSession, newCollectionNamespace, options));
}
 
Example #18
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public <D> Multi<D> find(ClientSession clientSession, Class<D> clazz) {
    return Wrappers.toMulti(collection.find(clientSession, clazz));
}
 
Example #19
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<UpdateResult> updateMany(ClientSession clientSession, Bson filter, Bson update) {
    return Wrappers.toUni(collection.updateMany(clientSession, filter, update));
}
 
Example #20
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<T> find(ClientSession clientSession, FindOptions options) {
    return Wrappers.toMulti(apply(options, collection.find(clientSession)));
}
 
Example #21
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<String> listDatabaseNames(ClientSession clientSession) {
    return Wrappers.toMulti(client.listDatabaseNames(clientSession));
}
 
Example #22
Source File: ReactiveMongoDatabaseImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Document> runCommand(ClientSession clientSession, Bson command, ReadPreference readPreference) {
    return Wrappers.toUni(database.runCommand(clientSession, command, readPreference));
}
 
Example #23
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<InsertManyResult> insertMany(ClientSession clientSession, List<? extends T> tDocuments) {
    return Wrappers.toUni(collection.insertMany(clientSession, tDocuments));
}
 
Example #24
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public <D> Multi<D> mapReduce(ClientSession clientSession, String mapFunction, String reduceFunction,
        Class<D> clazz, MapReduceOptions options) {
    return Multi.createFrom()
            .publisher(apply(options, collection.mapReduce(clientSession, mapFunction, reduceFunction, clazz)));
}
 
Example #25
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Long> countDocuments(ClientSession clientSession, Bson filter, CountOptions options) {
    return Wrappers.toUni(collection.countDocuments(clientSession, filter, options));
}
 
Example #26
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<String> createIndex(ClientSession clientSession, Bson key) {
    return Wrappers.toUni(collection.createIndex(clientSession, key));
}
 
Example #27
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<ChangeStreamDocument<Document>> watch(ClientSession clientSession) {
    return Wrappers.toMulti(client.watch(clientSession));
}
 
Example #28
Source File: ReactiveMongoCollectionImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public <D> Multi<D> distinct(ClientSession clientSession, String fieldName, Bson filter, Class<D> clazz) {
    return Wrappers.toMulti(collection.distinct(clientSession, fieldName, filter, clazz));
}
 
Example #29
Source File: ReactiveMongoDatabaseImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Void> drop(ClientSession clientSession) {
    return Wrappers.toUni(database.drop(clientSession));
}
 
Example #30
Source File: ReactiveMongoDatabaseImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Uni<Void> createCollection(ClientSession clientSession, String collectionName) {
    return Wrappers.toUni(database.createCollection(clientSession, collectionName));
}