Package | Description |
---|---|
com.mongodb |
The core mongodb package
|
com.mongodb.async.client |
This packages contains classes for the new async client
|
com.mongodb.async.client.gridfs |
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
|
com.mongodb.client |
This package contains classes for the new client api for MongoDatabase and MongoCollection
|
com.mongodb.client.gridfs |
This package contains the new GridFS implementation
|
com.mongodb.client.gridfs.codecs |
This package contains codecs for use with GridFS
|
com.mongodb.client.gridfs.model |
This package contains models for use with GridFS
|
org.bson |
Contains the base BSON classes.
|
org.bson.codecs |
This package contains all the default BSON codecs.
|
org.bson.types |
Contains classes implementing various BSON types.
|
Modifier and Type | Method and Description |
---|---|
Document |
MongoDatabaseImpl.runCommand(Bson command) |
Document |
MongoDatabaseImpl.runCommand(Bson command,
ReadPreference readPreference) |
Modifier and Type | Method and Description |
---|---|
MongoCollection<Document> |
MongoDatabaseImpl.getCollection(java.lang.String collectionName) |
ListCollectionsIterable<Document> |
MongoDatabaseImpl.listCollections() |
ListDatabasesIterable<Document> |
MongoClient.listDatabases()
Gets the list of databases
|
ListIndexesIterable<Document> |
MongoCollectionImpl.listIndexes() |
Modifier and Type | Method and Description |
---|---|
MongoCollection<Document> |
MongoDatabase.getCollection(java.lang.String collectionName)
Gets a collection.
|
MongoCollection<Document> |
MongoDatabaseImpl.getCollection(java.lang.String collectionName) |
ListCollectionsIterable<Document> |
MongoDatabase.listCollections()
Finds all the collections in this database.
|
ListCollectionsIterable<Document> |
MongoDatabaseImpl.listCollections() |
ListDatabasesIterable<Document> |
MongoClient.listDatabases()
Gets the list of databases
|
ListDatabasesIterable<Document> |
MongoClientImpl.listDatabases() |
ListIndexesIterable<Document> |
MongoCollectionImpl.listIndexes() |
ListIndexesIterable<Document> |
MongoCollection.listIndexes()
Get all the indexes in this collection.
|
Modifier and Type | Method and Description |
---|---|
void |
MongoDatabase.runCommand(Bson command,
ReadPreference readPreference,
SingleResultCallback<Document> callback)
Executes the given command in the context of the current database with the given read preference.
|
void |
MongoDatabaseImpl.runCommand(Bson command,
ReadPreference readPreference,
SingleResultCallback<Document> callback) |
void |
MongoDatabase.runCommand(Bson command,
SingleResultCallback<Document> callback)
Executes the given command in the context of the current database with a read preference of
ReadPreference.primary() . |
void |
MongoDatabaseImpl.runCommand(Bson command,
SingleResultCallback<Document> callback) |
Modifier and Type | Field and Description |
---|---|
private Document |
GridFSUploadStreamImpl.metadata |
private static Document |
GridFSIndexCheckImpl.PROJECTION |
Modifier and Type | Field and Description |
---|---|
private MongoCollection<Document> |
GridFSIndexCheckImpl.chunksCollection |
private MongoCollection<Document> |
GridFSDownloadStreamImpl.chunksCollection |
private MongoCollection<Document> |
GridFSBucketImpl.chunksCollection |
private MongoCollection<Document> |
GridFSUploadStreamImpl.chunksCollection |
private AsyncBatchCursor<Document> |
GridFSDownloadStreamImpl.cursor |
private java.util.concurrent.ConcurrentLinkedQueue<Document> |
GridFSDownloadStreamImpl.resultsQueue |
Modifier and Type | Method and Description |
---|---|
private static MongoCollection<Document> |
GridFSBucketImpl.getChunksCollection(MongoDatabase database,
java.lang.String bucketName) |
Modifier and Type | Method and Description |
---|---|
private byte[] |
GridFSDownloadStreamImpl.getBufferFromChunk(Document chunk,
int expectedChunkIndex) |
private <T> void |
GridFSIndexCheckImpl.hasIndex(MongoCollection<T> collection,
Document index,
SingleResultCallback<java.lang.Boolean> callback) |
Constructor and Description |
---|
GridFSUploadStreamImpl(MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection,
BsonValue fileId,
java.lang.String filename,
int chunkSizeBytes,
Document metadata,
GridFSIndexCheck indexCheck) |
Constructor and Description |
---|
GridFSBucketImpl(java.lang.String bucketName,
int chunkSizeBytes,
MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection) |
GridFSDownloadStreamImpl(GridFSFindIterable fileInfoIterable,
MongoCollection<Document> chunksCollection) |
GridFSIndexCheckImpl(MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection) |
GridFSUploadStreamImpl(MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection,
BsonValue fileId,
java.lang.String filename,
int chunkSizeBytes,
Document metadata,
GridFSIndexCheck indexCheck) |
Modifier and Type | Method and Description |
---|---|
Document |
MongoDatabase.runCommand(Bson command)
Executes the given command in the context of the current database with a read preference of
ReadPreference.primary() . |
Document |
MongoDatabase.runCommand(Bson command,
ReadPreference readPreference)
Executes the given command in the context of the current database with the given read preference.
|
Modifier and Type | Method and Description |
---|---|
MongoCollection<Document> |
MongoDatabase.getCollection(java.lang.String collectionName)
Gets a collection.
|
ListCollectionsIterable<Document> |
MongoDatabase.listCollections()
Finds all the collections in this database.
|
ListIndexesIterable<Document> |
MongoCollection.listIndexes()
Get all the indexes in this collection.
|
Modifier and Type | Field and Description |
---|---|
private Document |
GridFSUploadStreamImpl.metadata |
Modifier and Type | Field and Description |
---|---|
private MongoCollection<Document> |
GridFSDownloadStreamImpl.chunksCollection |
private MongoCollection<Document> |
GridFSBucketImpl.chunksCollection |
private MongoCollection<Document> |
GridFSUploadStreamImpl.chunksCollection |
private MongoCursor<Document> |
GridFSDownloadStreamImpl.cursor |
Modifier and Type | Method and Description |
---|---|
private Document |
GridFSDownloadStreamImpl.getChunk(int startChunkIndex) |
Modifier and Type | Method and Description |
---|---|
private static MongoCollection<Document> |
GridFSBucketImpl.getChunksCollection(MongoDatabase database,
java.lang.String bucketName) |
Modifier and Type | Method and Description |
---|---|
private byte[] |
GridFSDownloadStreamImpl.getBufferFromChunk(Document chunk,
int expectedChunkIndex) |
private <T> boolean |
GridFSBucketImpl.hasIndex(MongoCollection<T> collection,
Document index) |
Constructor and Description |
---|
GridFSUploadStreamImpl(MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection,
BsonValue fileId,
java.lang.String filename,
int chunkSizeBytes,
Document metadata) |
Constructor and Description |
---|
GridFSBucketImpl(java.lang.String bucketName,
int chunkSizeBytes,
MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection) |
GridFSDownloadStreamImpl(GridFSFile fileInfo,
MongoCollection<Document> chunksCollection) |
GridFSUploadStreamImpl(MongoCollection<GridFSFile> filesCollection,
MongoCollection<Document> chunksCollection,
BsonValue fileId,
java.lang.String filename,
int chunkSizeBytes,
Document metadata) |
Modifier and Type | Field and Description |
---|---|
private Codec<Document> |
GridFSFileCodec.documentCodec |
Modifier and Type | Method and Description |
---|---|
private Document |
GridFSFileCodec.asDocumentOrNull(BsonDocument bsonDocument) |
Modifier and Type | Field and Description |
---|---|
private Document |
GridFSFile.extraElements |
private Document |
GridFSFile.metadata |
private Document |
GridFSUploadOptions.metadata |
Modifier and Type | Method and Description |
---|---|
Document |
GridFSFile.getExtraElements()
Deprecated.
any extra information should be stored in the metadata document.
|
Document |
GridFSFile.getMetadata()
Any additional metadata stored along with the file
|
Document |
GridFSUploadOptions.getMetadata()
Returns any user provided data for the 'metadata' field of the files collection document.
|
Modifier and Type | Method and Description |
---|---|
GridFSUploadOptions |
GridFSUploadOptions.metadata(Document metadata)
Sets metadata to stored alongside the filename in the files collection
|
Constructor and Description |
---|
GridFSFile(BsonValue id,
java.lang.String filename,
long length,
int chunkSize,
java.util.Date uploadDate,
java.lang.String md5,
Document metadata)
Creates a new GridFSFile
|
GridFSFile(BsonValue id,
java.lang.String filename,
long length,
int chunkSize,
java.util.Date uploadDate,
java.lang.String md5,
Document metadata,
Document extraElements)
Creates a legacy implementation of the GridFSFile
|
Modifier and Type | Method and Description |
---|---|
Document |
Document.append(java.lang.String key,
java.lang.Object value)
Put the given key/value pair into this Document and return this.
|
static Document |
Document.parse(java.lang.String json)
Parses a string in MongoDB Extended JSON format to a
Document |
static Document |
Document.parse(java.lang.String json,
Decoder<Document> decoder)
Parses a string in MongoDB Extended JSON format to a
Document |
Modifier and Type | Method and Description |
---|---|
static Document |
Document.parse(java.lang.String json,
Decoder<Document> decoder)
Parses a string in MongoDB Extended JSON format to a
Document |
java.lang.String |
Document.toJson(Encoder<Document> encoder)
Gets a JSON representation of this document
|
java.lang.String |
Document.toJson(JsonWriterSettings writerSettings,
Encoder<Document> encoder)
Gets a JSON representation of this document
|
Modifier and Type | Field and Description |
---|---|
private Codec<Document> |
CodeWithScopeCodec.documentCodec |
Modifier and Type | Method and Description |
---|---|
Document |
DocumentCodec.decode(BsonReader reader,
DecoderContext decoderContext) |
Document |
DocumentCodec.generateIdIfAbsentFromDocument(Document document) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<Document> |
DocumentCodec.getEncoderClass() |
Modifier and Type | Method and Description |
---|---|
boolean |
DocumentCodec.documentHasId(Document document) |
void |
DocumentCodec.encode(BsonWriter writer,
Document document,
EncoderContext encoderContext) |
Document |
DocumentCodec.generateIdIfAbsentFromDocument(Document document) |
BsonValue |
DocumentCodec.getDocumentId(Document document) |
Constructor and Description |
---|
CodeWithScopeCodec(Codec<Document> documentCodec)
Creates a new CodeWithScopeCodec.
|
Modifier and Type | Field and Description |
---|---|
private Document |
CodeWithScope.scope |
Modifier and Type | Method and Description |
---|---|
Document |
CodeWithScope.getScope()
Gets the scope, which is is a mapping from identifiers to values, representing the scope in which the code should be evaluated.
|
Constructor and Description |
---|
CodeWithScope(java.lang.String code,
Document scope)
Construct an instance.
|