Package | Description |
---|---|
com.mongodb |
This package is the main entry point to the MongoDB Java Driver, and it contains the classes for the existing API from 2.x versions.
|
com.mongodb.client |
This package contains client interfaces
|
com.mongodb.client.gridfs |
This package contains the new GridFS implementation
|
Modifier and Type | Method and Description |
---|---|
MongoDatabase |
MongoClient.getDatabase(String databaseName) |
Modifier and Type | Method and Description |
---|---|
MongoDatabase |
MongoDatabase.withCodecRegistry(CodecRegistry codecRegistry)
Create a new MongoDatabase instance with a different codec registry.
|
MongoDatabase |
MongoDatabase.withReadConcern(ReadConcern readConcern)
Create a new MongoDatabase instance with a different read concern.
|
MongoDatabase |
MongoDatabase.withReadPreference(ReadPreference readPreference)
Create a new MongoDatabase instance with a different read preference.
|
MongoDatabase |
MongoDatabase.withWriteConcern(WriteConcern writeConcern)
Create a new MongoDatabase instance with a different write concern.
|
Modifier and Type | Method and Description |
---|---|
static GridFSBucket |
GridFSBuckets.create(MongoDatabase database)
Create a new GridFS bucket with the default
'fs' bucket name |
static GridFSBucket |
GridFSBuckets.create(MongoDatabase database,
String bucketName)
Create a new GridFS bucket with a custom bucket name
|
Copyright © 2016. All Rights Reserved.