Package | Description |
---|---|
com.mongodb |
The core mongodb package
|
com.mongodb.async.client.gridfs |
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
|
com.mongodb.client.gridfs |
This package contains the new GridFS implementation
|
com.mongodb.client.gridfs.model |
This package contains models for use with GridFS
|
com.mongodb.connection |
Contains classes that manage connecting to MongoDB servers.
|
com.mongodb.gridfs |
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
|
org.bson |
Contains the base BSON classes.
|
org.bson.codecs |
This package contains all the default BSON codecs.
|
org.bson.io |
Contains classes implementing I/O operations used by BSON objects.
|
org.bson.json |
JSON serialization and deserialization.
|
org.bson.types |
Contains classes implementing various BSON types.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
LazyDBCallback.createDBRef(java.lang.String ns,
ObjectId id) |
void |
DefaultDBCallback.gotDBRef(java.lang.String name,
java.lang.String namespace,
ObjectId id) |
Modifier and Type | Method and Description |
---|---|
ObjectId |
GridFSUploadStreamImpl.getObjectId() |
ObjectId |
GridFSUploadStream.getObjectId()
Gets the
ObjectId for the file to be uploaded
Throws a MongoGridFSException if the file id is not an ObjectId. |
Modifier and Type | Method and Description |
---|---|
void |
GridFSBucketImpl.delete(ClientSession clientSession,
ObjectId id,
SingleResultCallback<java.lang.Void> callback) |
void |
GridFSBucket.delete(ClientSession clientSession,
ObjectId id,
SingleResultCallback<java.lang.Void> callback)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
GridFSBucketImpl.delete(ObjectId id,
SingleResultCallback<java.lang.Void> callback) |
void |
GridFSBucket.delete(ObjectId id,
SingleResultCallback<java.lang.Void> callback)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
GridFSBucketImpl.downloadToStream(ClientSession clientSession,
ObjectId id,
AsyncOutputStream destination,
SingleResultCallback<java.lang.Long> callback) |
void |
GridFSBucket.downloadToStream(ClientSession clientSession,
ObjectId id,
AsyncOutputStream destination,
SingleResultCallback<java.lang.Long> callback)
Downloads the contents of the stored file specified by
id and writes the contents to the destination
AsyncOutputStream. |
void |
GridFSBucketImpl.downloadToStream(ObjectId id,
AsyncOutputStream destination,
SingleResultCallback<java.lang.Long> callback) |
void |
GridFSBucket.downloadToStream(ObjectId id,
AsyncOutputStream destination,
SingleResultCallback<java.lang.Long> callback)
Downloads the contents of the stored file specified by
id and writes the contents to the destination
AsyncOutputStream. |
GridFSDownloadStream |
GridFSBucketImpl.openDownloadStream(ClientSession clientSession,
ObjectId id) |
GridFSDownloadStream |
GridFSBucket.openDownloadStream(ClientSession clientSession,
ObjectId id)
Opens a AsyncInputStream from which the application can read the contents of the stored file specified by
id . |
GridFSDownloadStream |
GridFSBucketImpl.openDownloadStream(ObjectId id) |
GridFSDownloadStream |
GridFSBucket.openDownloadStream(ObjectId id)
Opens a AsyncInputStream from which the application can read the contents of the stored file specified by
id . |
void |
GridFSBucketImpl.rename(ClientSession clientSession,
ObjectId id,
java.lang.String newFilename,
SingleResultCallback<java.lang.Void> callback) |
void |
GridFSBucket.rename(ClientSession clientSession,
ObjectId id,
java.lang.String newFilename,
SingleResultCallback<java.lang.Void> callback)
Renames the stored file with the specified
id . |
void |
GridFSBucketImpl.rename(ObjectId id,
java.lang.String newFilename,
SingleResultCallback<java.lang.Void> callback) |
void |
GridFSBucket.rename(ObjectId id,
java.lang.String newFilename,
SingleResultCallback<java.lang.Void> callback)
Renames the stored file with the specified
id . |
Modifier and Type | Method and Description |
---|---|
void |
GridFSBucketImpl.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
AsyncInputStream source,
GridFSUploadOptions options,
SingleResultCallback<ObjectId> callback) |
void |
GridFSBucket.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
AsyncInputStream source,
GridFSUploadOptions options,
SingleResultCallback<ObjectId> callback)
Uploads the contents of the given
AsyncInputStream to a GridFS bucket. |
void |
GridFSBucketImpl.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
AsyncInputStream source,
SingleResultCallback<ObjectId> callback) |
void |
GridFSBucket.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
AsyncInputStream source,
SingleResultCallback<ObjectId> callback)
Uploads the contents of the given
AsyncInputStream to a GridFS bucket. |
void |
GridFSBucketImpl.uploadFromStream(java.lang.String filename,
AsyncInputStream source,
GridFSUploadOptions options,
SingleResultCallback<ObjectId> callback) |
void |
GridFSBucket.uploadFromStream(java.lang.String filename,
AsyncInputStream source,
GridFSUploadOptions options,
SingleResultCallback<ObjectId> callback)
Uploads the contents of the given
AsyncInputStream to a GridFS bucket. |
void |
GridFSBucketImpl.uploadFromStream(java.lang.String filename,
AsyncInputStream source,
SingleResultCallback<ObjectId> callback) |
void |
GridFSBucket.uploadFromStream(java.lang.String filename,
AsyncInputStream source,
SingleResultCallback<ObjectId> callback)
Uploads the contents of the given
AsyncInputStream to a GridFS bucket. |
Modifier and Type | Method and Description |
---|---|
ObjectId |
GridFSUploadStreamImpl.getFileId()
Deprecated.
|
abstract ObjectId |
GridFSUploadStream.getFileId()
Deprecated.
use
GridFSUploadStream.getObjectId() instead. |
ObjectId |
GridFSUploadStreamImpl.getObjectId() |
abstract ObjectId |
GridFSUploadStream.getObjectId()
Gets the
ObjectId for the file to be uploaded or throws an error if an alternative BsonType has been used for the id. |
ObjectId |
GridFSBucketImpl.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
java.io.InputStream source) |
ObjectId |
GridFSBucket.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
java.io.InputStream source)
Uploads the contents of the given
InputStream to a GridFS bucket. |
ObjectId |
GridFSBucketImpl.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
java.io.InputStream source,
GridFSUploadOptions options) |
ObjectId |
GridFSBucket.uploadFromStream(ClientSession clientSession,
java.lang.String filename,
java.io.InputStream source,
GridFSUploadOptions options)
Uploads the contents of the given
InputStream to a GridFS bucket. |
ObjectId |
GridFSBucketImpl.uploadFromStream(java.lang.String filename,
java.io.InputStream source) |
ObjectId |
GridFSBucket.uploadFromStream(java.lang.String filename,
java.io.InputStream source)
Uploads the contents of the given
InputStream to a GridFS bucket. |
ObjectId |
GridFSBucketImpl.uploadFromStream(java.lang.String filename,
java.io.InputStream source,
GridFSUploadOptions options) |
ObjectId |
GridFSBucket.uploadFromStream(java.lang.String filename,
java.io.InputStream source,
GridFSUploadOptions options)
Uploads the contents of the given
InputStream to a GridFS bucket. |
Modifier and Type | Method and Description |
---|---|
void |
GridFSBucketImpl.delete(ClientSession clientSession,
ObjectId id) |
void |
GridFSBucket.delete(ClientSession clientSession,
ObjectId id)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
GridFSBucketImpl.delete(ObjectId id) |
void |
GridFSBucket.delete(ObjectId id)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
GridFSBucketImpl.downloadToStream(ClientSession clientSession,
ObjectId id,
java.io.OutputStream destination) |
void |
GridFSBucket.downloadToStream(ClientSession clientSession,
ObjectId id,
java.io.OutputStream destination)
Downloads the contents of the stored file specified by
id and writes the contents to the destination Stream. |
void |
GridFSBucketImpl.downloadToStream(ObjectId id,
java.io.OutputStream destination) |
void |
GridFSBucket.downloadToStream(ObjectId id,
java.io.OutputStream destination)
Downloads the contents of the stored file specified by
id and writes the contents to the destination Stream. |
GridFSDownloadStream |
GridFSBucketImpl.openDownloadStream(ClientSession clientSession,
ObjectId id) |
GridFSDownloadStream |
GridFSBucket.openDownloadStream(ClientSession clientSession,
ObjectId id)
Opens a Stream from which the application can read the contents of the stored file specified by
id . |
GridFSDownloadStream |
GridFSBucketImpl.openDownloadStream(ObjectId id) |
GridFSDownloadStream |
GridFSBucket.openDownloadStream(ObjectId id)
Opens a Stream from which the application can read the contents of the stored file specified by
id . |
GridFSUploadStream |
GridFSBucketImpl.openUploadStream(ClientSession clientSession,
ObjectId id,
java.lang.String filename) |
GridFSUploadStream |
GridFSBucket.openUploadStream(ClientSession clientSession,
ObjectId id,
java.lang.String filename)
Opens a Stream that the application can write the contents of the file to.
|
void |
GridFSBucketImpl.rename(ClientSession clientSession,
ObjectId id,
java.lang.String newFilename) |
void |
GridFSBucket.rename(ClientSession clientSession,
ObjectId id,
java.lang.String newFilename)
Renames the stored file with the specified
id . |
void |
GridFSBucketImpl.rename(ObjectId id,
java.lang.String newFilename) |
void |
GridFSBucket.rename(ObjectId id,
java.lang.String newFilename)
Renames the stored file with the specified
id . |
Modifier and Type | Method and Description |
---|---|
ObjectId |
GridFSFile.getObjectId()
The
ObjectId for this file. |
Modifier and Type | Field and Description |
---|---|
private ObjectId |
ServerDescription.electionId |
private ObjectId |
ServerDescription.Builder.electionId |
private ObjectId |
MultiServerCluster.maxElectionId |
Modifier and Type | Method and Description |
---|---|
ObjectId |
ServerDescription.getElectionId()
The replica set electionid reported by this MongoDB server.
|
private static ObjectId |
DescriptionHelper.getElectionId(BsonDocument isMasterResult) |
Modifier and Type | Method and Description |
---|---|
ServerDescription.Builder |
ServerDescription.Builder.electionId(ObjectId electionId)
Sets the electionId reported by this server.
|
void |
LevelCountingBsonWriter.writeObjectId(ObjectId objectId) |
void |
LevelCountingBsonWriter.writeObjectId(java.lang.String name,
ObjectId objectId) |
Modifier and Type | Method and Description |
---|---|
GridFSDBFile |
GridFS.find(ObjectId objectId)
Finds one file matching the given objectId.
|
GridFSDBFile |
GridFS.findOne(ObjectId objectId)
Finds one file matching the given objectId.
|
void |
GridFS.remove(ObjectId id)
Removes the file matching the given id.
|
Modifier and Type | Field and Description |
---|---|
private ObjectId |
BsonDbPointer.id |
private ObjectId |
BsonObjectId.value |
Modifier and Type | Method and Description |
---|---|
protected ObjectId |
BsonDocumentReader.doReadObjectId() |
protected ObjectId |
BsonBinaryReader.doReadObjectId() |
protected abstract ObjectId |
AbstractBsonReader.doReadObjectId()
Handles the logic to read an ObjectId
|
ObjectId |
BsonDbPointer.getId()
Gets the id.
|
ObjectId |
Document.getObjectId(java.lang.Object key)
Gets the value of the given key as an ObjectId.
|
ObjectId |
BasicBSONObject.getObjectId(java.lang.String field)
Returns the object id or null if not set.
|
ObjectId |
BasicBSONObject.getObjectId(java.lang.String field,
ObjectId def)
Returns the object id or def if not set.
|
ObjectId |
BsonObjectId.getValue()
Get the
ObjectId value. |
ObjectId |
BsonReader.readObjectId()
Reads a BSON ObjectId from the reader.
|
ObjectId |
AbstractBsonReader.readObjectId() |
ObjectId |
BsonReader.readObjectId(java.lang.String name)
Reads a BSON ObjectId element from the reader.
|
ObjectId |
AbstractBsonReader.readObjectId(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
LazyBSONCallback.createDBRef(java.lang.String ns,
ObjectId id)
This is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).
|
void |
BSONCallbackAdapter.doWriteObjectId(ObjectId value) |
void |
BsonDocumentWriter.doWriteObjectId(ObjectId value) |
void |
BsonBinaryWriter.doWriteObjectId(ObjectId value) |
protected abstract void |
AbstractBsonWriter.doWriteObjectId(ObjectId value)
Handles the logic of writing an ObjectId
|
ObjectId |
BasicBSONObject.getObjectId(java.lang.String field,
ObjectId def)
Returns the object id or def if not set.
|
void |
EmptyBSONCallback.gotDBRef(java.lang.String name,
java.lang.String namespace,
ObjectId id) |
void |
BasicBSONCallback.gotDBRef(java.lang.String name,
java.lang.String namespace,
ObjectId id) |
void |
BSONCallback.gotDBRef(java.lang.String name,
java.lang.String namespace,
ObjectId id)
Invoked when
BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence. |
void |
EmptyBSONCallback.gotObjectId(java.lang.String name,
ObjectId id) |
void |
BasicBSONCallback.gotObjectId(java.lang.String name,
ObjectId id) |
void |
BSONCallback.gotObjectId(java.lang.String name,
ObjectId id)
Called when reading a field with a
BsonType.OBJECT_ID value. |
protected void |
BasicBSONEncoder.putObjectId(java.lang.String name,
ObjectId objectId)
Encodes an ObjectId field to a
BsonType.OBJECT_ID . |
void |
BsonWriter.writeObjectId(ObjectId objectId)
Writes a BSON ObjectId to the writer.
|
void |
AbstractBsonWriter.writeObjectId(ObjectId objectId) |
void |
BsonWriter.writeObjectId(java.lang.String name,
ObjectId objectId)
Writes a BSON ObjectId element to the writer.
|
void |
AbstractBsonWriter.writeObjectId(java.lang.String name,
ObjectId objectId) |
Constructor and Description |
---|
BsonDbPointer(java.lang.String namespace,
ObjectId id)
Construct a new instance with the given namespace and id.
|
BsonObjectId(ObjectId value)
Construct a new instance with the given
ObjectId instance. |
Modifier and Type | Method and Description |
---|---|
ObjectId |
ObjectIdCodec.decode(BsonReader reader,
DecoderContext decoderContext) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<ObjectId> |
ObjectIdCodec.getEncoderClass() |
Modifier and Type | Method and Description |
---|---|
void |
ObjectIdCodec.encode(BsonWriter writer,
ObjectId value,
EncoderContext encoderContext) |
Modifier and Type | Method and Description |
---|---|
ObjectId |
ByteBufferBsonInput.readObjectId() |
ObjectId |
BsonInput.readObjectId()
Reads a BSON ObjectId value from the stream.
|
Modifier and Type | Method and Description |
---|---|
void |
OutputBuffer.writeObjectId(ObjectId value) |
void |
BsonOutput.writeObjectId(ObjectId value)
Writes a BSON ObjectId to the stream.
|
Modifier and Type | Field and Description |
---|---|
private Converter<ObjectId> |
JsonWriterSettings.objectIdConverter |
private Converter<ObjectId> |
JsonWriterSettings.Builder.objectIdConverter |
Modifier and Type | Method and Description |
---|---|
protected ObjectId |
JsonReader.doReadObjectId() |
private ObjectId |
JsonReader.readDbPointerIdFromExtendedJson() |
private ObjectId |
JsonReader.visitObjectIdConstructor() |
private ObjectId |
JsonReader.visitObjectIdExtendedJson() |
Modifier and Type | Method and Description |
---|---|
Converter<ObjectId> |
JsonWriterSettings.getObjectIdConverter()
A converter from BSON ObjectId values to JSON.
|
Modifier and Type | Method and Description |
---|---|
void |
ShellObjectIdConverter.convert(ObjectId value,
StrictJsonWriter writer) |
void |
ExtendedJsonObjectIdConverter.convert(ObjectId value,
StrictJsonWriter writer) |
void |
JsonWriter.doWriteObjectId(ObjectId objectId) |
Modifier and Type | Method and Description |
---|---|
JsonWriterSettings.Builder |
JsonWriterSettings.Builder.objectIdConverter(Converter<ObjectId> objectIdConverter)
Sets the converter from BSON ObjectId values to JSON.
|
Modifier and Type | Method and Description |
---|---|
static ObjectId |
ObjectId.createFromLegacyFormat(int time,
int machine,
int inc)
Creates an ObjectId using time, machine and inc values.
|
static ObjectId |
ObjectId.get()
Gets a new object id.
|
Modifier and Type | Method and Description |
---|---|
int |
ObjectId.compareTo(ObjectId other) |