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.model |
This package contains models and options that help describe MongoCollection operations
|
com.mongodb.connection |
Contains classes that manage connecting to MongoDB servers.
|
com.mongodb.operation |
The core of the MongoDB driver works via operations, using the command pattern.
|
Modifier and Type | Class and Description |
---|---|
static class |
WriteConcern.Majority
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static WriteConcern |
WriteConcern.ACKNOWLEDGED
Write operations that use this write concern will wait for acknowledgement, using the default write concern configured on the server.
|
static WriteConcern |
WriteConcern.FSYNC_SAFE
Deprecated.
Prefer
JOURNALED |
static WriteConcern |
WriteConcern.FSYNCED
Deprecated.
Prefer
JOURNALED |
static WriteConcern |
WriteConcern.JOURNAL_SAFE
Deprecated.
Prefer
JOURNALED |
static WriteConcern |
WriteConcern.JOURNALED
Write operations wait for the server to group commit to the journal file on disk.
|
static WriteConcern |
WriteConcern.MAJORITY
Exceptions are raised for network issues, and server errors; waits on a majority of servers for the write operation.
|
static WriteConcern |
WriteConcern.NORMAL
Deprecated.
Prefer
UNACKNOWLEDGED |
static WriteConcern |
WriteConcern.REPLICA_ACKNOWLEDGED
Deprecated.
Prefer WriteConcern#W2
|
static WriteConcern |
WriteConcern.REPLICAS_SAFE
Deprecated.
Prefer
W2 |
static WriteConcern |
WriteConcern.SAFE
Deprecated.
Prefer
ACKNOWLEDGED |
static WriteConcern |
WriteConcern.UNACKNOWLEDGED
Write operations that use this write concern will return as soon as the message is written to the socket.
|
static WriteConcern |
WriteConcern.W1
Write operations that use this write concern will wait for acknowledgement from a single member.
|
static WriteConcern |
WriteConcern.W2
Write operations that use this write concern will wait for acknowledgement from two members.
|
static WriteConcern |
WriteConcern.W3
Write operations that use this write concern will wait for acknowledgement from three members.
|
WriteConcern |
MongoOptions.writeConcern
Deprecated.
Sets the write concern.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
DB.getWriteConcern()
Gets the write concern for this database.
|
WriteConcern |
Mongo.getWriteConcern()
Gets the write concern
|
WriteConcern |
MongoClientOptions.getWriteConcern()
The write concern to use.
|
WriteConcern |
InsertOptions.getWriteConcern()
The write concern to use for the insertion.
|
WriteConcern |
MongoOptions.getWriteConcern()
Deprecated.
Helper method to return the appropriate WriteConcern instance based on the current related options settings.
|
WriteConcern |
DBCollection.getWriteConcern()
Get the
WriteConcern for this collection. |
WriteConcern |
ConnectionString.getWriteConcern()
Gets the write concern specified in the connection string.
|
static WriteConcern |
WriteConcern.valueOf(String name)
Gets the WriteConcern constants by name (matching is done case insensitively).
|
WriteConcern |
WriteConcern.withFsync(boolean fsync)
Deprecated.
Prefer
withJournal(Boolean) |
WriteConcern |
WriteConcern.withJ(boolean journal)
Deprecated.
Prefer
withJournal(Boolean) |
WriteConcern |
WriteConcern.withJournal(Boolean journal)
Constructs a new WriteConcern from the current one and the specified journal value
|
WriteConcern |
WriteConcern.withW(int w)
Constructs a new WriteConcern from the current one and the specified integer-based value for w
|
WriteConcern |
WriteConcern.withW(String w)
Constructs a new WriteConcern from the current one and the specified tag-set based value for w
|
WriteConcern |
WriteConcern.withWTimeout(long wTimeout,
TimeUnit timeUnit)
Constructs a new WriteConcern from the current one and the specified wTimeout in the given time unit.
|
Modifier and Type | Method and Description |
---|---|
BulkWriteResult |
BulkWriteOperation.execute(WriteConcern writeConcern)
Execute the bulk write operation with the given write concern.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
boolean bypassDocumentValidation,
long maxTime,
TimeUnit maxTimeUnit,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
long maxTime,
TimeUnit maxTimeUnit,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
WriteResult |
DBCollection.insert(DBObject[] documents,
WriteConcern writeConcern)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(DBObject[] documents,
WriteConcern aWriteConcern,
DBEncoder encoder)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(DBObject document,
WriteConcern writeConcern)
Insert a document into a collection.
|
WriteResult |
DBCollection.insert(List<? extends DBObject> documents,
WriteConcern aWriteConcern)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(List<? extends DBObject> documents,
WriteConcern aWriteConcern,
DBEncoder dbEncoder)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(WriteConcern writeConcern,
DBObject... documents)
Insert documents into a collection.
|
WriteResult |
DBCollection.remove(DBObject query,
WriteConcern writeConcern)
Remove documents from a collection.
|
WriteResult |
DBCollection.remove(DBObject query,
WriteConcern writeConcern,
DBEncoder encoder)
Remove documents from a collection.
|
WriteResult |
DBCollection.save(DBObject document,
WriteConcern writeConcern)
Update an existing document or insert a document depending on the parameter.
|
void |
DB.setWriteConcern(WriteConcern writeConcern)
Sets the write concern for this database.
|
void |
Mongo.setWriteConcern(WriteConcern writeConcern)
Deprecated.
Set the default write concern with either
MongoClientURI or MongoClientOptions |
void |
MongoOptions.setWriteConcern(WriteConcern writeConcern)
Deprecated.
Sets the write concern.
|
void |
DBCollection.setWriteConcern(WriteConcern writeConcern)
Set the
WriteConcern for this collection. |
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi,
WriteConcern aWriteConcern)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi,
WriteConcern concern,
Boolean bypassDocumentValidation,
DBEncoder encoder)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi,
WriteConcern concern,
DBEncoder encoder)
Modify an existing document or documents in collection.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.writeConcern(WriteConcern writeConcern)
Sets the write concern.
|
InsertOptions |
InsertOptions.writeConcern(WriteConcern writeConcern)
Set the write concern to use for the insert.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
MongoCollection.getWriteConcern()
Get the write concern for the MongoCollection.
|
WriteConcern |
MongoClientSettings.getWriteConcern()
The write concern to use.
|
WriteConcern |
MongoDatabase.getWriteConcern()
Get the write concern for the MongoDatabase.
|
Modifier and Type | Method and Description |
---|---|
MongoCollection<TDocument> |
MongoCollection.withWriteConcern(WriteConcern writeConcern)
Create a new MongoCollection instance with a different write concern.
|
MongoDatabase |
MongoDatabase.withWriteConcern(WriteConcern writeConcern)
Create a new MongoDatabase instance with a different write concern.
|
MongoClientSettings.Builder |
MongoClientSettings.Builder.writeConcern(WriteConcern writeConcern)
Sets the write concern.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
GridFSBucket.getWriteConcern()
Get the write concern for the GridFSBucket.
|
Modifier and Type | Method and Description |
---|---|
GridFSBucket |
GridFSBucket.withWriteConcern(WriteConcern writeConcern)
Create a new GridFSBucket instance with a different write concern.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
MongoCollection.getWriteConcern()
Get the write concern for the MongoCollection.
|
WriteConcern |
MongoDatabase.getWriteConcern()
Get the write concern for the MongoDatabase.
|
Modifier and Type | Method and Description |
---|---|
MongoCollection<TDocument> |
MongoCollection.withWriteConcern(WriteConcern writeConcern)
Create a new MongoCollection instance with a different write concern.
|
MongoDatabase |
MongoDatabase.withWriteConcern(WriteConcern writeConcern)
Create a new MongoDatabase instance with a different write concern.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
GridFSBucket.getWriteConcern()
Get the write concern for the GridFSBucket.
|
Modifier and Type | Method and Description |
---|---|
GridFSBucket |
GridFSBucket.withWriteConcern(WriteConcern writeConcern)
Create a new GridFSBucket instance with a different write concern.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
DBCollectionRemoveOptions.getWriteConcern()
The write concern to use for the insertion.
|
WriteConcern |
DBCollectionUpdateOptions.getWriteConcern()
The write concern to use for the insertion.
|
WriteConcern |
DBCollectionFindAndModifyOptions.getWriteConcern()
Returns the writeConcern
|
Modifier and Type | Method and Description |
---|---|
DBCollectionRemoveOptions |
DBCollectionRemoveOptions.writeConcern(WriteConcern writeConcern)
Sets the write concern
|
DBCollectionUpdateOptions |
DBCollectionUpdateOptions.writeConcern(WriteConcern writeConcern)
Sets the write concern
|
DBCollectionFindAndModifyOptions |
DBCollectionFindAndModifyOptions.writeConcern(WriteConcern writeConcern)
Sets the writeConcern
|
Constructor and Description |
---|
BulkWriteBatchCombiner(ServerAddress serverAddress,
boolean ordered,
WriteConcern writeConcern)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
WriteConcern |
FindAndDeleteOperation.getWriteConcern()
Get the write concern for this operation
|
WriteConcern |
BaseWriteOperation.getWriteConcern()
Gets the write concern to apply
|
WriteConcern |
CreateViewOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
FindAndUpdateOperation.getWriteConcern()
Get the write concern for this operation
|
WriteConcern |
CreateIndexesOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
CreateCollectionOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
MapReduceToCollectionOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
AggregateToCollectionOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
RenameCollectionOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
DropDatabaseOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
FindAndReplaceOperation.getWriteConcern()
Get the write concern for this operation
|
WriteConcern |
DropCollectionOperation.getWriteConcern()
Gets the write concern.
|
WriteConcern |
MixedBulkWriteOperation.getWriteConcern()
Gets the write concern to apply
|
WriteConcern |
DropIndexOperation.getWriteConcern()
Gets the write concern.
|
Constructor and Description |
---|
AggregateToCollectionOperation(MongoNamespace namespace,
List<BsonDocument> pipeline,
WriteConcern writeConcern)
Construct a new instance.
|
BaseWriteOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern)
Deprecated.
|
BaseWriteOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
boolean retryWrites)
Construct an instance
|
CreateCollectionOperation(String databaseName,
String collectionName,
WriteConcern writeConcern)
Construct a new instance.
|
CreateIndexesOperation(MongoNamespace namespace,
List<IndexRequest> requests,
WriteConcern writeConcern)
Construct a new instance.
|
CreateUserOperation(MongoCredential credential,
boolean readOnly,
WriteConcern writeConcern)
Construct a new instance.
|
CreateViewOperation(String databaseName,
String viewName,
String viewOn,
List<BsonDocument> pipeline,
WriteConcern writeConcern)
Construct a new instance.
|
DeleteOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
boolean retryWrites,
List<DeleteRequest> deleteRequests)
Construct an instance.
|
DeleteOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
List<DeleteRequest> deleteRequests)
Deprecated.
|
DropCollectionOperation(MongoNamespace namespace,
WriteConcern writeConcern)
Construct a new instance.
|
DropDatabaseOperation(String databaseName,
WriteConcern writeConcern)
Construct a new instance.
|
DropIndexOperation(MongoNamespace namespace,
BsonDocument keys,
WriteConcern writeConcern)
Construct a new instance.
|
DropIndexOperation(MongoNamespace namespace,
String indexName,
WriteConcern writeConcern)
Construct a new instance.
|
DropUserOperation(String databaseName,
String userName,
WriteConcern writeConcern)
Construct a new instance.
|
FindAndDeleteOperation(MongoNamespace namespace,
WriteConcern writeConcern,
boolean retryWrites,
Decoder<T> decoder)
Construct a new instance.
|
FindAndDeleteOperation(MongoNamespace namespace,
WriteConcern writeConcern,
Decoder<T> decoder)
Deprecated.
|
FindAndReplaceOperation(MongoNamespace namespace,
WriteConcern writeConcern,
boolean retryWrites,
Decoder<T> decoder,
BsonDocument replacement)
Construct a new instance.
|
FindAndReplaceOperation(MongoNamespace namespace,
WriteConcern writeConcern,
Decoder<T> decoder,
BsonDocument replacement)
|
FindAndUpdateOperation(MongoNamespace namespace,
WriteConcern writeConcern,
boolean retryWrites,
Decoder<T> decoder,
BsonDocument update)
Construct a new instance.
|
FindAndUpdateOperation(MongoNamespace namespace,
WriteConcern writeConcern,
Decoder<T> decoder,
BsonDocument update)
|
InsertOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
boolean retryWrites,
List<InsertRequest> insertRequests)
Construct an instance.
|
InsertOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
List<InsertRequest> insertRequests)
Deprecated.
|
MapReduceToCollectionOperation(MongoNamespace namespace,
BsonJavaScript mapFunction,
BsonJavaScript reduceFunction,
String collectionName,
WriteConcern writeConcern)
Construct a MapReduceOperation with all the criteria it needs to execute
|
MixedBulkWriteOperation(MongoNamespace namespace,
List<? extends WriteRequest> writeRequests,
boolean ordered,
WriteConcern writeConcern)
|
MixedBulkWriteOperation(MongoNamespace namespace,
List<? extends WriteRequest> writeRequests,
boolean ordered,
WriteConcern writeConcern,
boolean retryWrites)
Construct a new instance.
|
RenameCollectionOperation(MongoNamespace originalNamespace,
MongoNamespace newNamespace,
WriteConcern writeConcern) |
UpdateOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
boolean retryWrites,
List<UpdateRequest> updates)
Construct an instance.
|
UpdateOperation(MongoNamespace namespace,
boolean ordered,
WriteConcern writeConcern,
List<UpdateRequest> updates)
Deprecated.
|
UpdateUserOperation(MongoCredential credential,
boolean readOnly,
WriteConcern writeConcern)
Construct a new instance.
|
Copyright © 2018. All rights reserved.