All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mongodb.client.internal.MongoIterableFactory Maven / Gradle / Ivy

There is a newer version: 5.1.4
Show newest version
/*
 * Copyright 2008-present MongoDB, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.mongodb.client.internal;

import com.mongodb.MongoNamespace;
import com.mongodb.ReadConcern;
import com.mongodb.ReadPreference;
import com.mongodb.WriteConcern;
import com.mongodb.client.AggregateIterable;
import com.mongodb.client.ChangeStreamIterable;
import com.mongodb.client.ClientSession;
import com.mongodb.client.DistinctIterable;
import com.mongodb.client.FindIterable;
import com.mongodb.client.ListCollectionsIterable;
import com.mongodb.client.ListDatabasesIterable;
import com.mongodb.client.ListIndexesIterable;
import com.mongodb.client.MapReduceIterable;
import com.mongodb.client.model.changestream.ChangeStreamLevel;
import com.mongodb.client.model.AggregationLevel;
import com.mongodb.lang.Nullable;
import org.bson.codecs.configuration.CodecRegistry;
import org.bson.conversions.Bson;

import java.util.List;

interface MongoIterableFactory {
    
    FindIterable findOf(@Nullable ClientSession clientSession, MongoNamespace namespace, Class documentClass,
                                 Class resultClass, CodecRegistry codecRegistry, ReadPreference readPreference,
                                 ReadConcern readConcern, OperationExecutor executor, Bson filter, boolean retryReads);

    
    AggregateIterable aggregateOf(@Nullable ClientSession clientSession, MongoNamespace namespace, Class documentClass,
                                           Class resultClass, CodecRegistry codecRegistry, ReadPreference readPreference,
                                           ReadConcern readConcern, WriteConcern writeConcern, OperationExecutor executor,
                                           List pipeline, AggregationLevel aggregationLevel, boolean retryReads);

    
    AggregateIterable aggregateOf(@Nullable ClientSession clientSession, String databaseName, Class documentClass,
                                           Class resultClass, CodecRegistry codecRegistry, ReadPreference readPreference,
                                           ReadConcern readConcern, WriteConcern writeConcern, OperationExecutor executor,
                                           List pipeline, AggregationLevel aggregationLevel, boolean retryReads);

    
    ChangeStreamIterable changeStreamOf(@Nullable ClientSession clientSession, String databaseName, CodecRegistry codecRegistry,
                                                 ReadPreference readPreference, ReadConcern readConcern, OperationExecutor executor,
                                                 List pipeline, Class resultClass,
                                                 ChangeStreamLevel changeStreamLevel, boolean retryReads);

    
    ChangeStreamIterable changeStreamOf(@Nullable ClientSession clientSession, MongoNamespace namespace,
                                                 CodecRegistry codecRegistry, ReadPreference readPreference, ReadConcern readConcern,
                                                 OperationExecutor executor, List pipeline, Class resultClass,
                                                 ChangeStreamLevel changeStreamLevel, boolean retryReads);

    
    DistinctIterable distinctOf(@Nullable ClientSession clientSession, MongoNamespace namespace, Class documentClass,
                                         Class resultClass, CodecRegistry codecRegistry, ReadPreference readPreference,
                                         ReadConcern readConcern, OperationExecutor executor, String fieldName, Bson filter,
                                         boolean retryReads);

    
    ListDatabasesIterable listDatabasesOf(@Nullable ClientSession clientSession, Class resultClass,
                                                   CodecRegistry codecRegistry, ReadPreference readPreference,
                                                   OperationExecutor executor, boolean retryReads);
    
    ListCollectionsIterable listCollectionsOf(@Nullable ClientSession clientSession, String databaseName,
                                                       boolean collectionNamesOnly, Class resultClass, CodecRegistry codecRegistry,
                                                       ReadPreference readPreference, OperationExecutor executor, boolean retryReads);
    
    ListIndexesIterable listIndexesOf(@Nullable ClientSession clientSession, MongoNamespace namespace, Class resultClass,
                                               CodecRegistry codecRegistry, ReadPreference readPreference, OperationExecutor executor,
                                               boolean retryReads);

    
    MapReduceIterable mapReduceOf(@Nullable ClientSession clientSession, MongoNamespace namespace, Class documentClass,
                                           Class resultClass, CodecRegistry codecRegistry, ReadPreference readPreference,
                                           ReadConcern readConcern, WriteConcern writeConcern, OperationExecutor executor,
                                           String mapFunction, String reduceFunction);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy