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
Modifier and TypeClassDescriptionstatic final class
A builder forServerApi
so thatServerApi
can be immutable, and to support easier construction through chaining. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerApi.Builder
builder()
Gets aBuilder
for instances of this class.boolean
Gets 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 versionint
hashCode()
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 aBuilder
for instances of this class.- Returns:
- the builder
-
toString
-
equals
-
hashCode
public int hashCode()
-