Class MongoDbProvider

    • Method Detail

      • getConnection

        public MongoDbConnection getConnection()
        Description copied from interface: NoSqlProvider
        Obtains a connection from this provider. The concept of a connection in this case is not strictly an active duplex UDP or TCP connection to the underlying database. It can be thought of more as a gateway, a path for inserting objects that may use a persistent connection or may use HTTP web service calls, etc.

        Where applicable, this method should return a connection from the connection pool as opposed to opening a brand new connection every time.

        Specified by:
        getConnection in interface NoSqlProvider<MongoDbConnection>
        Returns:
        a connection that can be used to create and persist objects to this database.
        See Also:
        NoSqlConnection
      • toString

        public java.lang.String toString()
        Description copied from interface: NoSqlProvider
        All implementations must override Object.toString() to provide information about the provider configuration (obscuring passwords with one-way hashes).
        Specified by:
        toString in interface NoSqlProvider<MongoDbConnection>
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation of this NoSQL provider.