code: public boolean flushall() {
          String result = "";
          Jedis jedis = null;
          try {
              jedis = this.jedisPool.getResource();
              result = jedis.flushAll();
              logger.info("redis client name: " + this.getCacheName() + " flushall.");
  
          } catch (Exception e) {
              logger.error(e.getMessage(), e);
              this.jedisPool.returnBrokenResource(jedis);
          } finally {
              if (jedis != null) {
                  this.jedisPool.returnResource(jedis);
              }
          }
          return "OK".equalsIgnoreCase(result);
      }
docs: Delete all the keys of all the existing databases, not just the currently selected one.
  
  @return false if redis did not execute the option