Package dev.morphia.internal
Interface WriteConfigurable<T>
-
- All Known Implementing Classes:
AggregationOptions
,DeleteOptions
,FindAndDeleteOptions
,FindAndModifyOptions
,InsertManyOptions
,InsertOneOptions
,ModifyOptions
,UpdateOptions
public interface WriteConfigurable<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default com.mongodb.WriteConcern
getWriteConcern()
Deprecated, for removal: This API element is subject to removal in a future version.usewriteConcern()
insteaddefault <C> com.mongodb.client.MongoCollection<C>
prepare(com.mongodb.client.MongoCollection<C> collection)
Applies the options to the collectioncom.mongodb.WriteConcern
writeConcern()
The write concern to use.T
writeConcern(com.mongodb.WriteConcern writeConcern)
Set the write concern to use.
-
-
-
Method Detail
-
getWriteConcern
@Deprecated(since="2.0", forRemoval=true) @Nullable default com.mongodb.WriteConcern getWriteConcern()
Deprecated, for removal: This API element is subject to removal in a future version.usewriteConcern()
insteadThe write concern to use. By default the write concern configured for the MongoCollection instance will be used.- Returns:
- the write concern, or null if the default will be used.
-
prepare
default <C> com.mongodb.client.MongoCollection<C> prepare(com.mongodb.client.MongoCollection<C> collection)
Applies the options to the collection- Type Parameters:
C
- the collection type- Parameters:
collection
- the collection to prepare- Returns:
- either the passed collection or the updated collection
- Since:
- 2.0
-
writeConcern
T writeConcern(@Nullable com.mongodb.WriteConcern writeConcern)
Set the write concern to use.- Parameters:
writeConcern
- the write concern- Returns:
- this
-
writeConcern
@Nullable com.mongodb.WriteConcern writeConcern()
The write concern to use. By default the write concern configured for the MongoCollection instance will be used.- Returns:
- the write concern, or null if the default will be used.
-
-