Interface MongoDBConnectionService

    • Method Detail

      • getClient

        com.mongodb.client.MongoClient getClient​(String id)
        Gets the MongoDB client for the given id.
        Parameters:
        id - the connection id
        Returns:
        the client configured by MongoDBConnectionConfig for the input id, or the default one if it doesn't exist
        Since:
        11.1
      • getDatabaseName

        String getDatabaseName​(String id)
        Gets the MongoDB database name for the given id.
        Parameters:
        id - the connection id
        Returns:
        the database name configured by MongoDBConnectionConfig for the input id, or the default one if it doesn't exist
        Since:
        11.1
      • getDatabase

        com.mongodb.client.MongoDatabase getDatabase​(String id)
        Parameters:
        id - the connection id
        Returns:
        the database configured by MongoDBConnectionConfig for the input id, or the default one if it doesn't exist