Package com.mongodb
Class ServerApi
- java.lang.Object
-
- com.mongodb.ServerApi
-
public final class ServerApi extends Object
A specification of the server API on which the application relies.- Since:
- 4.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerApi.BuilderA builder forServerApiso thatServerApican be immutable, and to support easier construction through chaining.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ServerApi.Builderbuilder()Gets aBuilderfor instances of this class.booleanequals(Object o)Optional<Boolean>getDeprecationErrors()Gets whether the application requires use of deprecated server APIs to be reported as errors.Optional<Boolean>getStrict()Gets whether the application requires strict server API version enforcement.ServerApiVersiongetVersion()Gets the server API versioninthashCode()StringtoString()
-
-
-
Method Detail
-
getVersion
public ServerApiVersion getVersion()
Gets the server API version- Returns:
- the server API version
-
getStrict
public Optional<Boolean> getStrict()
Gets whether the application requires strict server API version enforcement.The default is false.
- Returns:
- whether the application requires strict server API version enforcement
-
getDeprecationErrors
public Optional<Boolean> getDeprecationErrors()
Gets whether the application requires use of deprecated server APIs to be reported as errors.The default is false.
- Returns:
- whether the application requires use of deprecated server APIs to be reported as errors
-
builder
public static ServerApi.Builder builder()
Gets aBuilderfor instances of this class.- Returns:
- the builder
-
-