Class MongoClientVersion

java.lang.Object
org.springframework.data.mongodb.util.MongoClientVersion

public class MongoClientVersion extends Object
MongoClientVersion holds information about the used mongo-java client and is used to distinguish between different versions.
Since:
1.7
Author:
Christoph Strobl, Mark Paluch
  • Constructor Details

    • MongoClientVersion

      public MongoClientVersion()
  • Method Details

    • isAsyncClient

      public static boolean isAsyncClient()
      Returns:
      true if the async MongoDB Java driver is on classpath.
    • isSyncClientPresent

      public static boolean isSyncClientPresent()
      Returns:
      true if the sync MongoDB Java driver is on classpath.
      Since:
      2.1
    • isReactiveClientPresent

      public static boolean isReactiveClientPresent()
      Returns:
      true if the reactive MongoDB Java driver is on classpath.
      Since:
      2.1
    • isVersion5orNewer

      public static boolean isVersion5orNewer()
      Returns:
      true if the MongoDB Java driver version is 5 or newer.
      Since:
      4.3