Class MongoDbClient

  • All Implemented Interfaces:
    DbClient

    public class MongoDbClient
    extends Object
    implements DbClient
    MongoDB driver handler.
    • Method Detail

      • execute

        public <T extends CompletionStage<?>> T execute​(Function<DbExecute,​T> executor)
        Description copied from interface: DbClient
        Execute database statement.
        Specified by:
        execute in interface DbClient
        Type Parameters:
        T - statement execution result type
        Parameters:
        executor - database statement executor, see DbExecute
        Returns:
        statement execution result
      • ping

        public CompletionStage<Void> ping()
        Description copied from interface: DbClient
        Pings the database, completes when DB is up and ready, completes exceptionally if not.
        Specified by:
        ping in interface DbClient
        Returns:
        stage that completes when the ping finished
      • dbType

        public String dbType()
        Description copied from interface: DbClient
        Type of this database provider (such as jdbc:mysql, mongoDB etc.).
        Specified by:
        dbType in interface DbClient
        Returns:
        name of the database provider