Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip navigation links
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Index
  • Help
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes
  • SEARCH: 
 

Deprecated API

Contents

  • Deprecated Packages
  • Deprecated Interfaces
  • Deprecated Classes
  • Deprecated Enums
  • Deprecated Exceptions
  • Deprecated Fields
  • Deprecated Methods
  • Deprecated Constructors
  • Deprecated Enum Constants
  • Deprecated Packages 
    Package Description
    com.mongodb.async
    com.mongodb.binding
    com.mongodb.async.client
    com.mongodb.async.client.gridfs
    com.mongodb.async.client.gridfs.helpers
    com.mongodb.operation
  • Deprecated Interfaces 
    Interface Description
    com.mongodb.async.client.AggregateIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.AsyncBatchCursor
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.connection.AsyncConnection
    com.mongodb.binding.AsyncConnectionSource
    com.mongodb.async.client.gridfs.AsyncInputStream
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.operation.AsyncOperationExecutor
    there is no replacement for this interface
    com.mongodb.async.client.gridfs.AsyncOutputStream
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.binding.AsyncReadBinding
    com.mongodb.operation.AsyncReadOperation
    com.mongodb.binding.AsyncReadWriteBinding
    com.mongodb.binding.AsyncWriteBinding
    com.mongodb.operation.AsyncWriteOperation
    com.mongodb.operation.BatchCursor
    com.mongodb.async.client.ChangeStreamIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.ClientSession
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.connection.Cluster
    com.mongodb.connection.ClusterFactory
    com.mongodb.connection.Connection
    com.mongodb.event.ConnectionListener
    - No longer used
    com.mongodb.binding.ConnectionSource
    com.mongodb.async.client.DistinctIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.FindIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.gridfs.GridFSBucket
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.gridfs.GridFSDownloadStream
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.gridfs.GridFSFindIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.gridfs.GridFSUploadStream
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.ListCollectionsIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.ListDatabasesIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.ListIndexesIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.operation.MapReduceAsyncBatchCursor
    com.mongodb.operation.MapReduceBatchCursor
    com.mongodb.async.client.MapReduceIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.management.MBeanServer
    com.mongodb.async.client.MongoClient
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.MongoCollection
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.MongoDatabase
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.MongoIterable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.util.ObjectSerializer
    there is no replacement for this interface
    com.mongodb.async.client.Observable
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.Observer
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.operation.OperationExecutor
    there is no replacement for this interface
    com.mongodb.binding.ReadBinding
    com.mongodb.operation.ReadOperation
    com.mongodb.binding.ReadWriteBinding
    com.mongodb.binding.ReferenceCounted
    com.mongodb.connection.Server
    com.mongodb.async.SingleResultCallback
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.Subscription
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.binding.WriteBinding
    com.mongodb.operation.WriteOperation
  • Deprecated Classes 
    Class Description
    com.mongodb.operation.AbortTransactionOperation
    com.mongodb.operation.AggregateOperation
    com.mongodb.operation.AggregateToCollectionOperation
    com.mongodb.AggregationOutput
    Replace with use of aggregate methods in DBCollection that return instances of Cursor.
    com.mongodb.binding.AsyncClusterBinding
    com.mongodb.async.client.gridfs.helpers.AsynchronousChannelHelper
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.binding.AsyncSingleConnectionReadBinding
    com.mongodb.async.client.gridfs.helpers.AsyncStreamHelper
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.operation.BaseFindAndModifyOperation
    com.mongodb.operation.BaseWriteOperation
    org.bson.io.Bits
    there is no replacement for this utility class
    org.bson.BSON
    there is no replacement for this class
    com.mongodb.connection.BulkWriteBatchCombiner
    com.mongodb.connection.ByteBufferBsonOutput
    com.mongodb.Bytes
    there is no replacement for this class
    com.mongodb.operation.ChangeStreamOperation
    org.bson.util.ClassMap
    there is no replacement for this class
    com.mongodb.gridfs.CLI
    there is no replacement for this class
    com.mongodb.binding.ClusterBinding
    com.mongodb.event.ClusterEventMulticaster
    register multiple cluster listeners instead
    com.mongodb.event.CommandEventMulticaster
    register multiple command listeners instead
    com.mongodb.event.CommandListenerMulticaster
    register multiple command listeners in the settings
    com.mongodb.operation.CommandReadOperation
    com.mongodb.operation.CommandWriteOperation
    com.mongodb.operation.CommitTransactionOperation
    com.mongodb.event.ConnectionClosedEvent
    there is no replacement for this class
    com.mongodb.event.ConnectionMessageReceivedEvent
    - No longer used
    com.mongodb.event.ConnectionMessagesSentEvent
    - No longer used
    com.mongodb.event.ConnectionOpenedEvent
    there is no replacement for this class
    com.mongodb.event.ConnectionPoolEventMulticaster
    register multiple command listeners instead
    com.mongodb.operation.CountOperation
    com.mongodb.operation.CreateCollectionOperation
    com.mongodb.operation.CreateIndexesOperation
    com.mongodb.operation.CreateUserOperation
    use CommandWriteOperation directly or the mongod shell helpers.
    com.mongodb.operation.CreateViewOperation
    com.mongodb.operation.CurrentOpOperation
    com.mongodb.DBAddress
    This class is no longer needed, as the driver does not rely on it for anything anymore. Use ServerAddress instead.
    com.mongodb.connection.DefaultClusterFactory
    com.mongodb.operation.DeleteOperation
    com.mongodb.bulk.DeleteRequest
    com.mongodb.operation.DistinctOperation
    com.mongodb.operation.DropCollectionOperation
    com.mongodb.operation.DropDatabaseOperation
    com.mongodb.operation.DropIndexOperation
    com.mongodb.operation.DropUserOperation
    use CommandWriteOperation directly or the mongod shell helpers.
    com.mongodb.operation.FindAndDeleteOperation
    com.mongodb.operation.FindAndReplaceOperation
    com.mongodb.operation.FindAndUpdateOperation
    com.mongodb.operation.FindOperation
    com.mongodb.client.model.FindOptions
    there is no replacement for this class
    com.mongodb.operation.FsyncUnlockOperation
    com.mongodb.async.client.gridfs.GridFSBuckets
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.client.gridfs.model.GridFSDownloadByNameOptions
    use GridFSDownloadOptions instead.
    com.mongodb.GroupCommand
    the group command was deprecated in MongoDB 3.4
    com.mongodb.operation.GroupOperation
    com.mongodb.bulk.IndexRequest
    com.mongodb.operation.InsertOperation
    com.mongodb.bulk.InsertRequest
    com.mongodb.util.JSON
    This class has been superseded by to toJson and parse methods on BasicDBObject
    com.mongodb.util.JSONCallback
    This class has been superseded by to toJson and parse methods on BasicDBObject
    com.mongodb.util.JSONSerializers
    This class has been superseded by to toJson and parse methods on BasicDBObject
    com.mongodb.selector.LatencyMinimizingServerSelector
    com.mongodb.operation.ListCollectionsOperation
    com.mongodb.operation.ListDatabasesOperation
    com.mongodb.operation.ListIndexesOperation
    com.mongodb.operation.MapReduceStatistics
    com.mongodb.operation.MapReduceToCollectionOperation
    com.mongodb.operation.MapReduceWithInlineResultsOperation
    com.mongodb.management.MBeanServerFactory
    com.mongodb.operation.MixedBulkWriteOperation
    com.mongodb.Mongo
    Replaced by MongoClient. Any non-deprecated methods will be moved to MongoClient. The rest will be removed along with this class.
    com.mongodb.Mongo.Holder
    com.mongodb.async.client.MongoClients
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.async.client.MongoClientSettings
    use MongoClientSettings instead
    com.mongodb.MongoOptions
    Please use MongoClientOptions instead.
    com.mongodb.MongoURI
    Replaced by MongoClientURI
    com.mongodb.management.NullMBeanServer
    com.mongodb.async.client.Observables
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
    com.mongodb.operation.ParallelCollectionScanOperation
    com.mongodb.client.model.ParallelCollectionScanOptions
    this is an unused class and there should be no reason to use it
    com.mongodb.ParallelScanOptions
    the parallelCollectionScan command will be removed in MongoDB 4.2
    com.mongodb.selector.PrimaryServerSelector
    Use either ReadPreferenceServerSelector or WritableServerSelector, depending on your requirements
    com.mongodb.connection.QueryResult
    com.mongodb.selector.ReadPreferenceServerSelector
    com.mongodb.ReflectionDBObject
    Replaced by PojoCodecProvider
    com.mongodb.operation.RenameCollectionOperation
    com.mongodb.ReplicaSetStatus
    Prefer MongoClientOptions.Builder.addClusterListener(ClusterListener)
    com.mongodb.selector.ServerAddressSelector
    com.mongodb.event.ServerEventMulticaster
    register multiple server listeners instead
    com.mongodb.event.ServerMonitorEventMulticaster
    register multiple server monitor listeners instead
    com.mongodb.binding.SingleConnectionReadBinding
    com.mongodb.binding.SingleServerBinding
    com.mongodb.connection.SplittablePayload
    com.mongodb.operation.TransactionOperation
    com.mongodb.operation.UpdateOperation
    com.mongodb.bulk.UpdateRequest
    com.mongodb.operation.UpdateUserOperation
    use CommandWriteOperation directly or the mongod shell helpers.
    com.mongodb.operation.UserExistsOperation
    use CommandWriteOperation directly or the mongod shell helpers.
    com.mongodb.util.Util
    there is no replacement for this class
    com.mongodb.selector.WritableServerSelector
    com.mongodb.WriteConcern.Majority
    Prefer WriteConcern.MAJORITY, WriteConcern.withWTimeout(long, TimeUnit), WriteConcern.withJournal(Boolean)
    com.mongodb.bulk.WriteRequest
  • Deprecated Enums 
    Enum Description
    com.mongodb.client.model.AggregationLevel
    com.mongodb.AggregationOptions.OutputMode
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.client.model.changestream.ChangeStreamLevel
    com.mongodb.operation.OrderBy
  • Deprecated Exceptions 
    Exceptions Description
    com.mongodb.util.JSONParseException
    there is no replacement for this class
  • Deprecated Fields 
    Field Description
    com.mongodb.WriteConcern.FSYNC_SAFE
    Prefer WriteConcern.JOURNALED
    com.mongodb.WriteConcern.FSYNCED
    Prefer WriteConcern.JOURNALED
    com.mongodb.WriteConcern.JOURNAL_SAFE
    Prefer WriteConcern.JOURNALED
    com.mongodb.gridfs.GridFS.MAX_CHUNKSIZE
    You can calculate max chunkSize with a similar formula Mongo.getMaxBsonObjectSize() - 500*1000. Please ensure that you left enough space for metadata (500kb is enough).
    com.mongodb.MongoCredential.MONGODB_CR_MECHANISM
    This mechanism was replaced by MongoCredential.SCRAM_SHA_1_MECHANISM in MongoDB 3.0, and is now deprecated
    com.mongodb.WriteConcern.NORMAL
    Prefer WriteConcern.UNACKNOWLEDGED
    com.mongodb.WriteConcern.REPLICA_ACKNOWLEDGED
    Prefer WriteConcern#W2
    com.mongodb.WriteConcern.REPLICAS_SAFE
    Prefer WriteConcern.W2
    com.mongodb.WriteConcern.SAFE
    Prefer WriteConcern.ACKNOWLEDGED
  • Deprecated Methods 
    Method Description
    com.mongodb.DB.addOption(int)
    Replaced with DBCursor.addOption(int)
    com.mongodb.DBCollection.addOption(int)
    Replaced with DBCursor.addOption(int)
    com.mongodb.DBCursor.addOption(int)
    Prefer per-option methods, e.g. DBCursor.cursorType(CursorType), DBCursor.noCursorTimeout(boolean), etc.
    com.mongodb.Mongo.addOption(int)
    Add options instead on instances of DBCursor
    com.mongodb.DBCursor.addSpecial(String, Object)
    Prefer per-operator methods, e.g. DBCursor.comment(String), DBCursor.explain(), etc.
    com.mongodb.DB.addUser(String, char[])
    Use DB.command to call either the createUser or updateUser command
    com.mongodb.DB.addUser(String, char[], boolean)
    Use DB.command to call either the createUser or updateUser command
    com.mongodb.DBCollection.aggregate(DBObject, DBObject...)
    Use DBCollection.aggregate(List, AggregationOptions) instead
    com.mongodb.DBCollection.aggregate(List<? extends DBObject>)
    Use DBCollection.aggregate(List, AggregationOptions) instead
    com.mongodb.DBCollection.aggregate(List<? extends DBObject>, ReadPreference)
    Use DBCollection.aggregate(List, AggregationOptions, ReadPreference) )} instead
    com.mongodb.MongoClientOptions.Builder.alwaysUseMBeans(boolean)
    there is no replacement for this property
    com.mongodb.client.model.CreateCollectionOptions.autoIndex(boolean)
    this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0
    com.mongodb.WriteConcern.callGetLastError()
    Prefer WriteConcern.isAcknowledged()
    com.mongodb.async.client.MongoClientSettings.Builder.clusterSettings(ClusterSettings)
    Prefer MongoClientSettings.Builder.applyToClusterSettings(Block)
    com.mongodb.connection.Connection.command(String, BsonDocument, boolean, FieldNameValidator, Decoder<T>)
    Prefer Connection.command(String, BsonDocument, FieldNameValidator, ReadPreference, Decoder, SessionContext)
    com.mongodb.connection.AsyncConnection.commandAsync(String, BsonDocument, boolean, FieldNameValidator, Decoder<T>, SingleResultCallback<T>)
    Prefer AsyncConnection.commandAsync(String, BsonDocument, FieldNameValidator, ReadPreference, Decoder, SessionContext, SingleResultCallback)
    com.mongodb.Mongo.Holder.connect(MongoURI)
    Please use Mongo.Holder.connect(MongoClientURI) instead.
    com.mongodb.async.client.MongoClientSettings.Builder.connectionPoolSettings(ConnectionPoolSettings)
    Prefer MongoClientSettings.Builder.applyToConnectionPoolSettings(Block)
    com.mongodb.gridfs.GridFSFile.containsKey(String)
    com.mongodb.ReflectionDBObject.JavaWrapper.containsKey(String)  
    org.bson.BasicBSONObject.containsKey(String)
    org.bson.BSONObject.containsKey(String)
    Please use BSONObject.containsField(String) instead
    org.bson.LazyBSONObject.containsKey(String)
    org.bson.types.BasicBSONList.containsKey(String)
    com.mongodb.async.client.MongoCollection.count(ClientSession, SingleResultCallback<Long>)
    use MongoCollection.estimatedDocumentCount(SingleResultCallback) or MongoCollection.countDocuments(ClientSession, SingleResultCallback) instead
    com.mongodb.async.client.MongoCollection.count(ClientSession, Bson, SingleResultCallback<Long>)
    use MongoCollection.countDocuments(ClientSession, Bson, SingleResultCallback) instead
    com.mongodb.async.client.MongoCollection.count(ClientSession, Bson, CountOptions, SingleResultCallback<Long>)
    use MongoCollection.countDocuments(ClientSession, Bson, CountOptions, SingleResultCallback) instead
    com.mongodb.async.client.MongoCollection.count(SingleResultCallback<Long>)
    use MongoCollection.estimatedDocumentCount(SingleResultCallback) or MongoCollection.countDocuments(SingleResultCallback) instead
    com.mongodb.async.client.MongoCollection.count(Bson, SingleResultCallback<Long>)
    use MongoCollection.countDocuments(Bson, SingleResultCallback) instead
    com.mongodb.async.client.MongoCollection.count(Bson, CountOptions, SingleResultCallback<Long>)
    use MongoCollection.countDocuments(Bson, CountOptions, SingleResultCallback) instead
    com.mongodb.client.MongoCollection.count()
    use MongoCollection.countDocuments() or MongoCollection.estimatedDocumentCount() instead
    com.mongodb.client.MongoCollection.count(ClientSession)
    use MongoCollection.countDocuments(ClientSession) instead
    com.mongodb.client.MongoCollection.count(ClientSession, Bson)
    use MongoCollection.countDocuments(ClientSession, Bson) instead
    com.mongodb.client.MongoCollection.count(ClientSession, Bson, CountOptions)
    use MongoCollection.countDocuments(ClientSession, Bson, CountOptions) instead
    com.mongodb.client.MongoCollection.count(Bson)
    use MongoCollection.countDocuments(Bson) instead
    com.mongodb.client.MongoCollection.count(Bson, CountOptions)
    use MongoCollection.countDocuments(Bson, CountOptions) instead
    com.mongodb.async.client.MongoClients.create(MongoClientSettings)
    use MongoClients.create(com.mongodb.MongoClientSettings) instead
    com.mongodb.async.client.MongoClients.create(MongoClientSettings, MongoDriverInformation)
    use MongoClients.create(com.mongodb.MongoClientSettings, MongoDriverInformation) instead
    com.mongodb.connection.DefaultClusterFactory.create(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory, List<MongoCredential>, ClusterListener, ConnectionPoolListener, ConnectionListener, CommandListener)
    use DefaultClusterFactory.createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory, List, CommandListener, String, MongoDriverInformation, List) instead
    com.mongodb.connection.DefaultClusterFactory.create(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory, List<MongoCredential>, ClusterListener, ConnectionPoolListener, ConnectionListener, CommandListener, String, MongoDriverInformation)
    use DefaultClusterFactory.createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory, List, CommandListener, String, MongoDriverInformation, List) instead
    com.mongodb.connection.DefaultClusterFactory.createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory, List<MongoCredential>, CommandListener, String, MongoDriverInformation)
    use DefaultClusterFactory.createCluster(ClusterSettings, ServerSettings, ConnectionPoolSettings, StreamFactory, StreamFactory, List, CommandListener, String, MongoDriverInformation, List) instead
    org.bson.types.ObjectId.createFromLegacyFormat(int, int, int)
    Use ObjectId(int, int) instead
    com.mongodb.MongoCredential.createMongoCRCredential(String, String, char[])
    MONGODB-CR was replaced by SCRAM-SHA-1 in MongoDB 3.0, and is now deprecated. Use the MongoCredential.createCredential(String, String, char[]) factory method instead.
    com.mongodb.async.client.MongoClientSettings.Builder.credentialList(List<MongoCredential>)
    Prefer MongoClientSettings.Builder.credential(MongoCredential)
    com.mongodb.connection.ClusterSettings.Builder.description(String)
    Prefer MongoClientSettings.Builder.applicationName(String)
    com.mongodb.MongoClientOptions.Builder.description(String)
    Prefer MongoClientOptions.Builder.applicationName(String)
    com.mongodb.DB.doEval(String, Object...)
    The eval command was deprecated in MongoDB 3.0
    com.mongodb.DB.doGetCollection(String)
    there is no replacement for this method
    com.mongodb.client.gridfs.GridFSBucket.downloadToStreamByName(String, OutputStream)
    use GridFSBucket.downloadToStream(String, OutputStream) instead.
    com.mongodb.client.gridfs.GridFSBucket.downloadToStreamByName(String, OutputStream, GridFSDownloadByNameOptions)
    use GridFSBucket.downloadToStream(String, OutputStream, GridFSDownloadOptions) instead.
    com.mongodb.DB.eval(String, Object...)
    The eval command was deprecated in MongoDB 3.0
    com.mongodb.operation.FsyncUnlockOperation.execute(WriteBinding)
    use FsyncUnlockOperation.execute(ReadBinding) instead.
    com.mongodb.DBCollection.find(DBObject, DBObject, int, int)
    use DBCursor.skip(int) and DBCursor.batchSize(int) on the DBCursor returned from DBCollection.find(DBObject, DBObject)
    com.mongodb.DBCollection.find(DBObject, DBObject, int, int, int)
    use DBCursor.skip(int), DBCursor.batchSize(int) and DBCursor.setOptions(int) on the DBCursor returned from DBCollection.find(DBObject, DBObject)
    com.mongodb.client.MongoIterable.forEach(Block<? super TResult>)
    Prefer Iterable.forEach(Consumer), which was added in Java 8
    com.mongodb.Mongo.fsync(boolean)
    com.mongodb.WriteConcern.fsync()
    Prefer WriteConcern.getJournal()
    com.mongodb.Mongo.fsyncAndLock()
    com.mongodb.Mongo.getAddress()
    com.mongodb.client.gridfs.model.GridFSFile.getAliases()
    any aliases should be stored in the metadata document instead.
    com.mongodb.connection.ClusterDescription.getAll()
    Use ClusterDescription.getServerDescriptions() instead
    com.mongodb.Mongo.getAllAddress()
    com.mongodb.connection.ClusterDescription.getAny()
    Replace with a filter on ServerDescription in the caller
    com.mongodb.connection.ClusterDescription.getAnyPrimaryOrSecondary()
    Replace with a filter on ServerDescription in the caller
    com.mongodb.connection.ClusterDescription.getAnyPrimaryOrSecondary(TagSet)
    Replace with a filter on ServerDescription in the caller
    com.mongodb.connection.ClusterDescription.getByServerAddress(ServerAddress)
    Replace with a filter on ServerDescription in the caller
    com.mongodb.DB.getCollectionFromString(String)
    Prefer DB.getCollection(String)
    com.mongodb.Mongo.getConnectPoint()
    com.mongodb.client.gridfs.model.GridFSFile.getContentType()
    content type information should be stored the metadata document instead.
    com.mongodb.DBCollection.getCount(DBObject, DBObject)
    Prefer DBCollection.count(DBObject, DBCollectionCountOptions)
    com.mongodb.DBCollection.getCount(DBObject, DBObject, long, long)
    Prefer DBCollection.count(DBObject, DBCollectionCountOptions)
    com.mongodb.DBCollection.getCount(DBObject, DBObject, long, long, ReadPreference)
    Prefer DBCollection.count(DBObject, DBCollectionCountOptions)
    com.mongodb.DBCollection.getCount(DBObject, DBObject, ReadPreference)
    Prefer DBCollection.count(DBObject, DBCollectionCountOptions)
    org.bson.types.ObjectId.getCounter()  
    com.mongodb.async.client.MongoClientSettings.getCredentialList()
    Prefer MongoClientSettings.getCredential()
    com.mongodb.ConnectionString.getCredentialList()
    Prefer ConnectionString.getCredential()
    com.mongodb.MongoClient.getCredentialsList()
    Prefer MongoClient.getCredential()
    org.bson.types.ObjectId.getCurrentCounter()  
    com.mongodb.Mongo.getDatabaseNames()
    Replaced with MongoClient.listDatabaseNames()
    com.mongodb.Mongo.getDB(String)
    This method is not currently scheduled for removal, but prefer MongoClient.getDatabase(String) for new code. Note that DB and MongoDatabase can be used together in the same application, whith the same MongoClient instance.
    com.mongodb.connection.ClusterSettings.getDescription()
    Prefer MongoClientSettings.getApplicationName()
    com.mongodb.MongoClientOptions.getDescription()
    Prefer MongoClientOptions.getApplicationName()
    com.mongodb.client.gridfs.model.GridFSFile.getExtraElements()
    any extra information should be stored in the metadata document instead.
    com.mongodb.client.gridfs.GridFSUploadStream.getFileId()
    use GridFSUploadStream.getObjectId() instead.
    com.mongodb.WriteConcern.getFsync()
    Prefer WriteConcern.getJournal()
    org.bson.types.ObjectId.getGeneratedMachineIdentifier()  
    org.bson.types.ObjectId.getGeneratedProcessIdentifier()  
    com.mongodb.DBCollection.getHintFields()
    Prefer DBCursor.hint(DBObject)
    com.mongodb.client.model.CountOptions.getHintString()
    Prefer CountOptions.getHint()
    com.mongodb.client.model.DBCollectionCountOptions.getHintString()
    Prefer DBCollectionCountOptions.getHint()
    com.mongodb.WriteConcern.getJ()
    Prefer WriteConcern.getJournal()
    org.bson.types.ObjectId.getMachineIdentifier()  
    com.mongodb.Mongo.getMaxBsonObjectSize()
    com.mongodb.client.model.FindOptions.getMaxScan()
    Deprecated as of MongoDB 4.0 release
    com.mongodb.operation.FindOperation.getMaxScan()
    Deprecated as of MongoDB 4.0 release
    com.mongodb.client.gridfs.model.GridFSFile.getMD5()
    file hashing is deprecated and may be removed in the future.
    com.mongodb.gridfs.GridFSFile.getMD5()
    there is no replacement for this method
    com.mongodb.client.model.DBCollectionFindOptions.getModifiers()
    use the individual setters instead
    com.mongodb.client.model.FindOptions.getModifiers()
    use the individual modifier methods instead.
    com.mongodb.DB.getMongo()
    Use DB.getMongoClient() instead
    com.mongodb.Mongo.getMongoOptions()
    Please use MongoClient class to connect to server and corresponding MongoClient.getMongoClientOptions()
    com.mongodb.client.model.ReplaceOneModel.getOptions()
    use ReplaceOneModel.getReplaceOptions() instead
    com.mongodb.DB.getOptions()
    Replaced with DBCursor.getOptions()
    com.mongodb.DBCollection.getOptions()
    Replaced with DBCursor.getOptions()
    com.mongodb.DBCursor.getOptions()
    com.mongodb.Mongo.getOptions()
    Get options instead from instances of DBCursor
    com.mongodb.AggregationOptions.getOutputMode()
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.connection.ClusterDescription.getPrimaries()
    Replace with a filter on ServerDescription in the caller
    org.bson.types.ObjectId.getProcessIdentifier()  
    com.mongodb.Mongo.getReplicaSetStatus()
    com.mongodb.ConnectionString.getRetryWrites()
    Prefer ConnectionString.getRetryWritesValue()
    com.mongodb.connection.ClusterDescription.getSecondaries()
    Replace with a filter on ServerDescription in the caller
    com.mongodb.connection.ClusterDescription.getSecondaries(TagSet)
    Replace with a filter on ServerDescription in the caller
    com.mongodb.Mongo.getServerAddressList()
    com.mongodb.connection.ConnectionDescription.getServerVersion()
    Use ConnectionDescription.getMaxWireVersion() instead
    com.mongodb.async.client.MongoClient.getSettings()
    this method is being removed
    com.mongodb.MongoClientOptions.getSocketFactory()
    Prefer MongoClientOptions.isSslEnabled() and MongoClientOptions.getSslContext()
    com.mongodb.DB.getStats()
    Prefer DB.command(DBObject) to run the dbStats command
    com.mongodb.ConnectionString.getStreamType()
    Use MongoClientSettings.Builder.streamFactoryFactory(StreamFactoryFactory) to configure the stream type programmatically
    org.bson.types.ObjectId.getTime()
    Use #getDate instead
    org.bson.types.ObjectId.getTimeSecond()
    Use #getTimestamp instead
    com.mongodb.ConnectionString.getURI()
    com.mongodb.operation.AggregateOperation.getUseCursor()
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.Mongo.getUsedDatabases()
    com.mongodb.connection.ServerDescription.getVersion()
    Use ServerDescription.getMaxWireVersion() instead
    com.mongodb.WriteConcern.getWtimeout()
    Prefer WriteConcern.getWTimeout(TimeUnit)
    org.bson.BasicBSONCallback.gotBinaryArray(String, byte[])
    org.bson.BSONCallback.gotBinaryArray(String, byte[])
    this method is no longer called by the decoder
    org.bson.EmptyBSONCallback.gotBinaryArray(String, byte[])
    com.mongodb.DBCollection.group(DBObject, DBObject, DBObject, String)
    The group command was deprecated in MongoDB 3.4
    com.mongodb.DBCollection.group(DBObject, DBObject, DBObject, String, String)
    The group command was deprecated in MongoDB 3.4
    com.mongodb.DBCollection.group(DBObject, DBObject, DBObject, String, String, ReadPreference)
    The group command was deprecated in MongoDB 3.4
    com.mongodb.DBCollection.group(GroupCommand)
    The group command was deprecated in MongoDB 3.4
    com.mongodb.DBCollection.group(GroupCommand, ReadPreference)
    The group command was deprecated in MongoDB 3.4
    com.mongodb.async.client.MongoClientSettings.Builder.heartbeatSocketSettings(SocketSettings)
    configuring heartbeatSocketSettings will be removed in the future.
    com.mongodb.DBCursor.hint(String)
    Prefer DBCursor.hint(DBObject)
    com.mongodb.client.model.CountOptions.hintString(String)
    Prefer CountOptions.hint(Bson)
    com.mongodb.client.model.DBCollectionCountOptions.hintString(String)
    Prefer DBCollectionCountOptions.hint(DBObject)
    com.mongodb.MongoClientOptions.isAlwaysUseMBeans()
    there is no replacement for this property
    com.mongodb.client.model.CreateCollectionOptions.isAutoIndex()
    this option was deprecated in MongoDB 3.2 and removed in MongodB 4.0
    com.mongodb.connection.SocketSettings.isKeepAlive()
    configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
    com.mongodb.Mongo.isLocked()
    com.mongodb.client.model.FindOptions.isSnapshot()
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.operation.FindOperation.isSnapshot()
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.MongoClientOptions.isSocketKeepAlive()
    configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
    com.mongodb.client.model.CreateCollectionOptions.isUsePowerOf2Sizes()
    As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB server
    com.mongodb.operation.CreateCollectionOperation.isUsePowerOf2Sizes()
    As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB server
    com.mongodb.connection.SocketSettings.Builder.keepAlive(boolean)
    configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
    com.mongodb.connection.Connection.killCursor(List<Long>)
    Replaced by Connection.killCursor(MongoNamespace, List)
    com.mongodb.connection.AsyncConnection.killCursorAsync(List<Long>, SingleResultCallback<Void>)
    Replaced by AsyncConnection.killCursorAsync(MongoNamespace, List, SingleResultCallback)
    com.mongodb.MongoClientOptions.Builder.legacyDefaults()
    there is no replacement for this method
    com.mongodb.WriteConcern.majorityWriteConcern(int, boolean, boolean)
    Prefer WriteConcern.MAJORITY, WriteConcern.withWTimeout(long, TimeUnit), WriteConcern.withJournal(Boolean)
    org.bson.BsonBinaryReader.mark()
    org.bson.BsonDocumentReader.mark()
    org.bson.BsonReader.mark()
    Use BsonReader.getMark() instead
    org.bson.io.BsonInput.mark(int)
    Use BsonInput.getMark(int) instead
    org.bson.io.ByteBufferBsonInput.mark(int)
    org.bson.json.JsonReader.mark()
    com.mongodb.async.client.FindIterable.maxScan(long)
    Deprecated as of MongoDB 4.0 release
    com.mongodb.client.FindIterable.maxScan(long)
    Deprecated as of MongoDB 4.0 release
    com.mongodb.client.model.FindOptions.maxScan(long)
    Deprecated as of MongoDB 4.0 release
    com.mongodb.DBCursor.maxScan(int)
    Deprecated as of MongoDB 4.0 release
    com.mongodb.operation.FindOperation.maxScan(long)
    Deprecated as of MongoDB 4.0 release
    com.mongodb.async.client.FindIterable.modifiers(Bson)
    use the individual setters instead
    com.mongodb.client.FindIterable.modifiers(Bson)
    use the individual setters instead
    com.mongodb.client.model.DBCollectionFindOptions.modifiers(DBObject)
    use the individual setters instead
    com.mongodb.client.model.FindOptions.modifiers(Bson)
    use the individual modifier methods instead.
    com.mongodb.operation.FindOperation.modifiers(BsonDocument)
    use the individual setters instead
    com.mongodb.client.gridfs.GridFSBucket.openDownloadStreamByName(String)
    use GridFSBucket.openDownloadStream(String) instead.
    com.mongodb.client.gridfs.GridFSBucket.openDownloadStreamByName(String, GridFSDownloadByNameOptions)
    use GridFSBucket.openDownloadStream(String, GridFSDownloadOptions) instead.
    com.mongodb.AggregationOptions.Builder.outputMode(AggregationOptions.OutputMode)
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.DBCollection.parallelScan(ParallelScanOptions)
    the parallelCollectionScan command will be removed in MongoDB 4.2
    com.mongodb.connection.Connection.query(MongoNamespace, BsonDocument, BsonDocument, int, int, boolean, boolean, boolean, boolean, boolean, boolean, Decoder<T>)
    Replaced by Connection.query(MongoNamespace, BsonDocument, BsonDocument, int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, Decoder)
    com.mongodb.connection.AsyncConnection.queryAsync(MongoNamespace, BsonDocument, BsonDocument, int, int, boolean, boolean, boolean, boolean, boolean, boolean, Decoder<T>, SingleResultCallback<QueryResult<T>>)
    Replaced by AsyncConnection.queryAsync(MongoNamespace, BsonDocument, BsonDocument, int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, Decoder, SingleResultCallback)
    com.mongodb.DB.removeUser(String)
    Use DB.command to call the dropUser command
    com.mongodb.async.client.MongoCollection.replaceOne(ClientSession, Bson, TDocument, UpdateOptions, SingleResultCallback<UpdateResult>)
    use MongoCollection.replaceOne(ClientSession, Bson, Object, ReplaceOptions, SingleResultCallback)
    com.mongodb.async.client.MongoCollection.replaceOne(Bson, TDocument, UpdateOptions, SingleResultCallback<UpdateResult>)
    use MongoCollection.replaceOne(Bson, Object, ReplaceOptions, SingleResultCallback) instead
    com.mongodb.client.MongoCollection.replaceOne(ClientSession, Bson, TDocument, UpdateOptions)
    use MongoCollection.replaceOne(ClientSession, Bson, Object, ReplaceOptions) instead
    com.mongodb.client.MongoCollection.replaceOne(Bson, TDocument, UpdateOptions)
    use MongoCollection.replaceOne(Bson, Object, ReplaceOptions) instead
    org.bson.BsonBinaryReader.reset()
    org.bson.BsonDocumentReader.reset()
    org.bson.BsonReader.reset()
    Prefer BsonReader.getMark()
    org.bson.io.BsonInput.reset()
    Prefer BsonInput.getMark(int)
    org.bson.io.ByteBufferBsonInput.reset()
    org.bson.json.JsonReader.reset()
    com.mongodb.DB.resetOptions()
    Replaced with DBCursor.resetOptions()
    com.mongodb.DBCollection.resetOptions()
    Replaced with DBCursor.resetOptions()
    com.mongodb.DBCursor.resetOptions()
    com.mongodb.Mongo.resetOptions()
    Reset options instead on instances of DBCursor
    com.mongodb.ServerAddress.sameHost(String)
    use the ServerAddress.equals(Object) method instead
    com.mongodb.async.client.MongoClientSettings.Builder.serverSettings(ServerSettings)
    Prefer MongoClientSettings.Builder.applyToServerSettings(Block)
    com.mongodb.DBCollection.setHintFields(List<? extends DBObject>)
    Prefer DBCursor.hint(DBObject)
    com.mongodb.DB.setOptions(int)
    Replaced with DBCursor.setOptions(int)
    com.mongodb.DBCollection.setOptions(int)
    Replaced with DBCursor.setOptions(int)
    com.mongodb.DBCursor.setOptions(int)
    com.mongodb.Mongo.setOptions(int)
    Set options on instances of DBCursor
    com.mongodb.Mongo.setReadPreference(ReadPreference)
    Set the default read preference with either MongoClientURI or MongoClientOptions
    com.mongodb.Mongo.setWriteConcern(WriteConcern)
    Set the default write concern with either MongoClientURI or MongoClientOptions
    com.mongodb.DBCursor.showDiskLoc()
    showDiskLoc has been deprecated in the MongoDB server. There is no replacement for it.
    com.mongodb.DB.slaveOk()
    Replaced with ReadPreference.secondaryPreferred()
    com.mongodb.DBCollection.slaveOk()
    Replaced with ReadPreference.secondaryPreferred()
    com.mongodb.DBCursor.slaveOk()
    Replaced with ReadPreference.secondaryPreferred()
    com.mongodb.Mongo.slaveOk()
    Replaced with ReadPreference.secondaryPreferred()
    com.mongodb.async.client.FindIterable.snapshot(boolean)
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.client.FindIterable.snapshot(boolean)
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.client.model.FindOptions.snapshot(boolean)
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.DBCursor.snapshot()
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.operation.FindOperation.snapshot(boolean)
    Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
    com.mongodb.MongoClientOptions.Builder.socketFactory(SocketFactory)
    Prefer MongoClientOptions.Builder.sslEnabled(boolean) and MongoClientOptions.Builder.sslContext(SSLContext)
    com.mongodb.MongoClientOptions.Builder.socketKeepAlive(boolean)
    configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
    com.mongodb.async.client.MongoClientSettings.Builder.socketSettings(SocketSettings)
    Prefer MongoClientSettings.Builder.applyToSocketSettings(Block)
    com.mongodb.async.client.MongoClientSettings.Builder.sslSettings(SslSettings)
    Prefer MongoClientSettings.Builder.applyToSslSettings(Block)
    com.mongodb.client.model.Filters.text(String, String)
    use Filters.text(String, TextSearchOptions)
    org.bson.types.ObjectId.toStringMongod()
    use ObjectId.toHexString()
    com.mongodb.Mongo.unlock()
    com.mongodb.async.client.AggregateIterable.useCursor(Boolean)
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.client.AggregateIterable.useCursor(Boolean)
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.operation.AggregateOperation.useCursor(Boolean)
    There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
    com.mongodb.client.model.CreateCollectionOptions.usePowerOf2Sizes(Boolean)
    As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB server
    com.mongodb.operation.CreateCollectionOperation.usePowerOf2Sizes(Boolean)
    As of MongoDB 3.0, power of 2 sizes is ignored by the MongoDB server
    com.mongodb.gridfs.GridFSFile.validate()
    there is no replacement for this method
    com.mongodb.connection.ServerDescription.Builder.version(ServerVersion)
    Use ServerDescription.Builder.maxWireVersion instead
    com.mongodb.WriteConcern.withFsync(boolean)
    Prefer WriteConcern.withJournal(Boolean)
    com.mongodb.WriteConcern.withJ(boolean)
    Prefer WriteConcern.withJournal(Boolean)
  • Deprecated Constructors 
    Constructor Description
    com.mongodb.operation.AggregateToCollectionOperation(MongoNamespace, List<BsonDocument>)
    Prefer AggregateToCollectionOperation(MongoNamespace, List, WriteConcern)
    com.mongodb.binding.AsyncClusterBinding(Cluster, ReadPreference)
    Prefer AsyncClusterBinding(Cluster, ReadPreference, ReadConcern)
    com.mongodb.connection.AsynchronousSocketChannelStreamFactoryFactory()
    Use AsynchronousSocketChannelStreamFactoryFactory.builder() instead to construct the AsynchronousSocketChannelStreamFactoryFactory.
    com.mongodb.operation.BaseWriteOperation(MongoNamespace, boolean, WriteConcern)
    use BaseWriteOperation(MongoNamespace, boolean, WriteConcern, boolean) instead
    com.mongodb.client.model.changestream.ChangeStreamDocument(BsonDocument, MongoNamespace, TDocument, BsonDocument, OperationType, UpdateDescription)
    Prefer ChangeStreamDocument(BsonDocument, MongoNamespace, Object, BsonDocument, BsonTimestamp, OperationType, UpdateDescription)
    com.mongodb.client.model.changestream.ChangeStreamDocument(BsonDocument, MongoNamespace, TDocument, BsonDocument, BsonTimestamp, OperationType, UpdateDescription)
    com.mongodb.binding.ClusterBinding(Cluster, ReadPreference)
    Prefer ClusterBinding(Cluster, ReadPreference, ReadConcern)
    com.mongodb.connection.ConnectionDescription(ConnectionId, ServerVersion, int, ServerType, int, int, int, List<String>)  
    com.mongodb.connection.ConnectionDescription(ConnectionId, ServerVersion, ServerType, int, int, int)
    Prefer ConnectionDescription(ConnectionId, ServerVersion, int, ServerType, int, int, int, List)
    com.mongodb.connection.ConnectionDescription(ConnectionId, ServerVersion, ServerType, int, int, int, List<String>)
    Prefer ConnectionDescription(ConnectionId, ServerVersion, int, ServerType, int, int, int, List)
    org.bson.json.JsonWriter.Context(JsonWriter.Context, BsonContextType, String)
    com.mongodb.operation.CreateIndexesOperation(MongoNamespace, List<IndexRequest>)
    Prefer CreateIndexesOperation(MongoNamespace, List, WriteConcern)
    com.mongodb.DB(Mongo, String)
    Prefer Mongo.getDB(String)
    com.mongodb.operation.DeleteOperation(MongoNamespace, boolean, WriteConcern, List<DeleteRequest>)
    use DeleteOperation(MongoNamespace, boolean, WriteConcern, boolean, List) instead
    com.mongodb.operation.DropCollectionOperation(MongoNamespace)
    Prefer DropCollectionOperation(MongoNamespace, WriteConcern)
    com.mongodb.operation.DropDatabaseOperation(String)
    com.mongodb.operation.DropIndexOperation(MongoNamespace, String)
    Prefer DropIndexOperation(MongoNamespace, String, WriteConcern)
    com.mongodb.operation.DropIndexOperation(MongoNamespace, BsonDocument)
    Prefer DropIndexOperation(MongoNamespace, BsonDocument, WriteConcern)
    com.mongodb.operation.FindAndDeleteOperation(MongoNamespace, WriteConcern, Decoder<T>)
    use FindAndDeleteOperation(MongoNamespace, WriteConcern, boolean, Decoder) instead
    com.mongodb.operation.FindAndDeleteOperation(MongoNamespace, Decoder<T>)
    use FindAndDeleteOperation(MongoNamespace, WriteConcern, boolean, Decoder) instead
    com.mongodb.operation.FindAndReplaceOperation(MongoNamespace, WriteConcern, Decoder<T>, BsonDocument)
    use FindAndReplaceOperation(MongoNamespace, WriteConcern, boolean, Decoder, BsonDocument) instead
    com.mongodb.operation.FindAndReplaceOperation(MongoNamespace, Decoder<T>, BsonDocument)
    use FindAndReplaceOperation(MongoNamespace, WriteConcern, boolean, Decoder, BsonDocument) instead
    com.mongodb.operation.FindAndUpdateOperation(MongoNamespace, WriteConcern, Decoder<T>, BsonDocument)
    use FindAndUpdateOperation(MongoNamespace, WriteConcern, boolean, Decoder, BsonDocument) instead
    com.mongodb.operation.FindAndUpdateOperation(MongoNamespace, Decoder<T>, BsonDocument)
    use FindAndUpdateOperation(MongoNamespace, WriteConcern, boolean, Decoder, BsonDocument) instead
    com.mongodb.client.model.FindOptions(FindOptions)
    this constructor is unused
    com.mongodb.client.gridfs.model.GridFSFile(BsonValue, String, long, int, Date, String, Document)
    there is no replacement for this constructor
    com.mongodb.client.gridfs.model.GridFSFile(BsonValue, String, long, int, Date, String, Document, Document)
    there is no replacement for this constructor
    com.mongodb.operation.InsertOperation(MongoNamespace, boolean, WriteConcern, List<InsertRequest>)
    use InsertOperation(MongoNamespace, boolean, WriteConcern, boolean, List) instead
    org.bson.json.JsonWriterSettings()
    Prefer JsonWriterSettings.builder(), but note that the default output mode is different for that method
    org.bson.json.JsonWriterSettings(boolean)
    Use the JsonWriterSettings.Builder instead
    org.bson.json.JsonWriterSettings(JsonMode)
    Use the JsonWriterSettings.Builder instead
    org.bson.json.JsonWriterSettings(JsonMode, boolean)
    Use the JsonWriterSettings.Builder instead
    org.bson.json.JsonWriterSettings(JsonMode, String)
    Use the JsonWriterSettings.Builder instead
    org.bson.json.JsonWriterSettings(JsonMode, String, String)
    Use the JsonWriterSettings.Builder instead
    com.mongodb.operation.MixedBulkWriteOperation(MongoNamespace, List<? extends WriteRequest>, boolean, WriteConcern)
    use MixedBulkWriteOperation(MongoNamespace, List, boolean, WriteConcern, boolean) instead
    com.mongodb.Mongo()
    Replaced by MongoClient())
    com.mongodb.Mongo(MongoURI)
    Replaced by MongoClient(MongoClientURI)
    com.mongodb.Mongo(ServerAddress)
    Replaced by MongoClient(ServerAddress)
    com.mongodb.Mongo(ServerAddress, MongoOptions)
    Replaced by MongoClient(ServerAddress, MongoClientOptions)
    com.mongodb.Mongo(ServerAddress, ServerAddress)
    Please use MongoClient(java.util.List) instead.
    com.mongodb.Mongo(ServerAddress, ServerAddress, MongoOptions)
    Please use MongoClient(java.util.List, MongoClientOptions) instead.
    com.mongodb.Mongo(String)
    Replaced by MongoClient(String)
    com.mongodb.Mongo(String, int)
    Replaced by MongoClient(String, int)
    com.mongodb.Mongo(String, MongoOptions)
    Replaced by MongoClient(String, MongoClientOptions)
    com.mongodb.Mongo(List<ServerAddress>)
    Replaced by MongoClient(java.util.List)
    com.mongodb.Mongo(List<ServerAddress>, MongoOptions)
    Replaced by MongoClient(java.util.List, MongoClientOptions)
    com.mongodb.MongoClient(ServerAddress, List<MongoCredential>)
    Prefer MongoClient(ServerAddress, MongoCredential, MongoClientOptions)
    com.mongodb.MongoClient(ServerAddress, List<MongoCredential>, MongoClientOptions)
    Prefer MongoClient(ServerAddress, MongoCredential, MongoClientOptions)
    com.mongodb.MongoClient(ServerAddress, List<MongoCredential>, MongoClientOptions, MongoDriverInformation)
    Prefer MongoClient(ServerAddress, MongoCredential, MongoClientOptions, MongoDriverInformation)
    com.mongodb.MongoClient(List<ServerAddress>, List<MongoCredential>)
    Prefer MongoClient(List, MongoCredential, MongoClientOptions)
    com.mongodb.MongoClient(List<ServerAddress>, List<MongoCredential>, MongoClientOptions)
    Prefer MongoClient(List, MongoCredential, MongoClientOptions)
    com.mongodb.MongoClient(List<ServerAddress>, List<MongoCredential>, MongoClientOptions, MongoDriverInformation)
    Prefer MongoClient(List, MongoCredential, MongoClientOptions, MongoDriverInformation)
    com.mongodb.MongoNodeIsRecoveringException(ServerAddress)
    Prefer MongoNodeIsRecoveringException(BsonDocument, ServerAddress)
    com.mongodb.MongoNotPrimaryException(ServerAddress)
    Prefer MongoNotPrimaryException(BsonDocument, ServerAddress)
    com.mongodb.MongoOptions()
    use MongoClientOptions
    com.mongodb.MongoOptions(MongoClientOptions)
    use MongoClientOptions
    com.mongodb.MongoURI(MongoClientURI)
    com.mongodb.MongoURI(String)
    Replaced by MongoClientURI(String)
    com.mongodb.connection.netty.NettyStreamFactoryFactory()
    Use NettyStreamFactoryFactory.builder() instead to construct the NettyStreamFactoryFactory.
    com.mongodb.connection.netty.NettyStreamFactoryFactory(EventLoopGroup, ByteBufAllocator)
    Use NettyStreamFactoryFactory.builder() instead to construct the NettyStreamFactoryFactory.
    org.bson.types.ObjectId(int, int, short, int)
    Use ObjectId(int, int) instead
    org.bson.types.ObjectId(Date, int, short, int)
    Use ObjectId(Date, int) instead
    com.mongodb.operation.RenameCollectionOperation(MongoNamespace, MongoNamespace)
    Prefer RenameCollectionOperation(MongoNamespace, MongoNamespace, WriteConcern)
    com.mongodb.client.model.ReplaceOneModel(Bson, T, UpdateOptions)
    use ReplaceOneModel(Bson, Object, ReplaceOptions) instead
    com.mongodb.connection.SocketStreamFactory(SocketSettings, SslSettings, SocketFactory)
    Prefer SocketStreamFactory(SocketSettings, SslSettings)
    com.mongodb.operation.UpdateOperation(MongoNamespace, boolean, WriteConcern, List<UpdateRequest>)
    use UpdateOperation(MongoNamespace, boolean, WriteConcern, boolean, List) instead
    com.mongodb.WriteConcern()
    Prefer WriteConcern.UNACKNOWLEDGED
    com.mongodb.WriteConcern(boolean)
    prefer WriteConcern.JOURNALED or WriteConcern.withJournal(Boolean)
    com.mongodb.WriteConcern(int, int, boolean)
    Prefer WriteConcern.withW(int), WriteConcern.withWTimeout(long, TimeUnit), WriteConcern.withJournal(Boolean)
    com.mongodb.WriteConcern(int, int, boolean, boolean)
    Prefer WriteConcern.withW(int), WriteConcern.withWTimeout(long, TimeUnit), WriteConcern.withJournal(Boolean)
    com.mongodb.WriteConcern(String, int, boolean, boolean)
    Prefer WriteConcern.withW(String), WriteConcern.withWTimeout(long, TimeUnit), WriteConcern.withJournal(Boolean)
    com.mongodb.bulk.WriteConcernError(int, String, BsonDocument)  
  • Deprecated Enum Constants 
    Enum Constant Description
    com.mongodb.AuthenticationMechanism.MONGODB_CR
    This mechanism was replaced by AuthenticationMechanism.SCRAM_SHA_1 in MongoDB 3.0, and is now deprecated
    org.bson.json.JsonMode.STRICT
    The format generated with this mode is no longer considered standard for MongoDB tools. This value is not currently scheduled for removal.
Skip navigation links
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Index
  • Help
  • Prev
  • Next
  • Frames
  • No Frames
  • All Classes