Package com.mongodb
Class ReadConcern
- java.lang.Object
 - 
- com.mongodb.ReadConcern
 
 
- 
@Deprecated(since="2021-05-27") public final class ReadConcern extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.A read concern allows clients to choose a level of isolation for their reads.- Since:
 - 3.2
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static ReadConcernAVAILABLEDeprecated.The available read concern.static ReadConcernDEFAULTDeprecated.Use the servers default read concern.static ReadConcernLINEARIZABLEDeprecated.The linearizable read concern.static ReadConcernLOCALDeprecated.The local read concern.static ReadConcernMAJORITYDeprecated.The majority read concern.static ReadConcernSNAPSHOTDeprecated.The snapshot read concern. 
- 
Constructor Summary
Constructors Constructor Description ReadConcern(ReadConcernLevel level)Deprecated.Construct a new read concern 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BsonDocumentasDocument()Deprecated.Gets this read concern as a document.booleanequals(java.lang.Object o)Deprecated.ReadConcernLevelgetLevel()Deprecated.Gets the read concern level.inthashCode()Deprecated.booleanisServerDefault()Deprecated. 
 - 
 
- 
- 
Field Detail
- 
DEFAULT
public static final ReadConcern DEFAULT
Deprecated.Use the servers default read concern. 
- 
LOCAL
public static final ReadConcern LOCAL
Deprecated.The local read concern. 
- 
MAJORITY
public static final ReadConcern MAJORITY
Deprecated.The majority read concern. 
- 
LINEARIZABLE
public static final ReadConcern LINEARIZABLE
Deprecated.The linearizable read concern.This read concern is only compatible with
ReadPreference.primary().- Since:
 - 3.4
 
 
- 
SNAPSHOT
public static final ReadConcern SNAPSHOT
Deprecated.The snapshot read concern.- Since:
 - 3.8
 
 
- 
AVAILABLE
public static final ReadConcern AVAILABLE
Deprecated.The available read concern.- Since:
 - 3.9
 
 
 - 
 
- 
Constructor Detail
- 
ReadConcern
public ReadConcern(ReadConcernLevel level)
Deprecated.Construct a new read concern- Parameters:
 level- the read concern level
 
 - 
 
- 
Method Detail
- 
getLevel
@Nullable public ReadConcernLevel getLevel()
Deprecated.Gets the read concern level.- Returns:
 - the read concern level, which may be null (which indicates to use the server's default level)
 - Since:
 - 3.6
 
 
- 
isServerDefault
public boolean isServerDefault()
Deprecated.- Returns:
 - true if this is the server default read concern
 
 
- 
asDocument
public BsonDocument asDocument()
Deprecated.Gets this read concern as a document.- Returns:
 - The read concern as a BsonDocument
 
 
- 
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
Deprecated.- Overrides:
 hashCodein classjava.lang.Object
 
 - 
 
 -