org.springframework.data.mongodb.util

Class 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 Detail

      • MongoClientVersion

        public MongoClientVersion()
    • Method Detail

      • isMongo3Driver

        @Deprecated
        public static boolean isMongo3Driver()
        Deprecated. since 2.1, which requires MongoDB Java driver 3.8. Returns true by default.
        Returns:
        true if MongoDB Java driver version 3.0 or later is on classpath.
      • isMongo34Driver

        @Deprecated
        public static boolean isMongo34Driver()
        Deprecated. since 2.1, which requires MongoDB Java driver 3.8. Returns true by default.
        Returns:
        true if MongoDB Java driver version 3.4 or later is on classpath.
        Since:
        1.10
      • isMongo38Driver

        public static boolean isMongo38Driver()
        Returns:
        true if MongoDB Java driver version 3.8 or later is on classpath.
        Since:
        2.1
      • 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