Package com.mongodb
Class ServerApi
java.lang.Object
com.mongodb.ServerApi
A specification of the server API on which the application relies.
- Since:
- 4.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder forServerApiso thatServerApican be immutable, and to support easier construction through chaining. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerApi.Builderbuilder()Gets aBuilderfor instances of this class.booleanGets whether the application requires use of deprecated server APIs to be reported as errors.Gets whether the application requires strict server API version enforcement.Gets the server API versioninthashCode()toString()
-
Method Details
-
getVersion
Gets the server API version- Returns:
- the server API version
-
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
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
Gets aBuilderfor instances of this class.- Returns:
- the builder
-
toString
-
equals
-
hashCode
public int hashCode()
-