class MongodbConnect implements CacheCloseable {
    private final MongoClient mongoClient;

    public MongodbConnect(MongoClient mongoClient) {
        this.mongoClient = mongoClient;
    }

    @Override
    public void close() {<FILL_FUNCTION_BODY>}

    public MongoClient getMongoClient() {
        return mongoClient;
    }
}

        try {
            if (this.mongoClient != null) {
                this.mongoClient.close();
            }
        } catch (Exception e) {
            log.error("[connection common cache] close mongodb connect error: {}", e.getMessage());
        }
    
<no_super_class>