com.mongodb.reactivestreams.client.ListDatabasesPublisher Java Examples

The following examples show how to use com.mongodb.reactivestreams.client.ListDatabasesPublisher. 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: DatabaseListOptions.java    From quarkus with Apache License 2.0 5 votes vote down vote up
public <T> ListDatabasesPublisher<T> apply(ListDatabasesPublisher<T> publisher) {
    ListDatabasesPublisher<T> result = publisher;
    if (nameOnly) {
        result = publisher.nameOnly(nameOnly);
    }
    if (filter != null) {
        result = publisher.filter(filter);
    }
    if (maxTime > 0) {
        result.maxTime(maxTime, maxTimeUnit);
    }
    return result;
}
 
Example #2
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Override
public Multi<Document> listDatabases(DatabaseListOptions options) {
    if (options != null) {
        ListDatabasesPublisher<Document> publisher = apply(options, client.listDatabases());
        return Wrappers.toMulti(publisher);
    } else {
        return listDatabases();
    }
}
 
Example #3
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Override
public <T> Multi<T> listDatabases(Class<T> clazz, DatabaseListOptions options) {
    if (options != null) {
        ListDatabasesPublisher<T> publisher = apply(options, client.listDatabases(clazz));
        return Wrappers.toMulti(publisher);
    } else {
        return listDatabases(clazz);
    }
}
 
Example #4
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
private <T> ListDatabasesPublisher<T> apply(DatabaseListOptions options, ListDatabasesPublisher<T> publisher) {
    if (options == null) {
        return publisher;
    }
    return options.apply(publisher);
}
 
Example #5
Source File: ReactiveMongoClientImpl.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public Multi<Document> listDatabases(ClientSession clientSession, DatabaseListOptions options) {
    ListDatabasesPublisher<Document> publisher = apply(options, client.listDatabases(clientSession));
    return Wrappers.toMulti(publisher);
}
 
Example #6
Source File: MongoClientWrapper.java    From ditto with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public ListDatabasesPublisher<Document> listDatabases() {
    return mongoClient.listDatabases();
}
 
Example #7
Source File: MongoClientWrapper.java    From ditto with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public <TResult> ListDatabasesPublisher<TResult> listDatabases(final Class<TResult> clazz) {
    return mongoClient.listDatabases(clazz);
}
 
Example #8
Source File: MongoClientWrapper.java    From ditto with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public ListDatabasesPublisher<Document> listDatabases(final ClientSession clientSession) {
    return listDatabases(clientSession);
}
 
Example #9
Source File: MongoClientWrapper.java    From ditto with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public <TResult> ListDatabasesPublisher<TResult> listDatabases(final ClientSession clientSession,
        final Class<TResult> clazz) {

    return mongoClient.listDatabases(clientSession, clazz);
}
 
Example #10
Source File: MongoClientImpl.java    From mongo-java-driver-reactivestreams with Apache License 2.0 4 votes vote down vote up
@Override
public ListDatabasesPublisher<Document> listDatabases() {
    return listDatabases(Document.class);
}
 
Example #11
Source File: MongoClientImpl.java    From mongo-java-driver-reactivestreams with Apache License 2.0 4 votes vote down vote up
@Override
public <TResult> ListDatabasesPublisher<TResult> listDatabases(final Class<TResult> clazz) {
    return new ListDatabasesPublisherImpl<TResult>(wrapped.listDatabases(clazz));
}
 
Example #12
Source File: MongoClientImpl.java    From mongo-java-driver-reactivestreams with Apache License 2.0 4 votes vote down vote up
@Override
public ListDatabasesPublisher<Document> listDatabases(final ClientSession clientSession) {
    return listDatabases(clientSession, Document.class);
}
 
Example #13
Source File: MongoClientImpl.java    From mongo-java-driver-reactivestreams with Apache License 2.0 4 votes vote down vote up
@Override
public <TResult> ListDatabasesPublisher<TResult> listDatabases(final ClientSession clientSession, final Class<TResult> clazz) {
    return new ListDatabasesPublisherImpl<TResult>(wrapped.listDatabases(clientSession.getWrapped(), clazz));
}