code: private Jedis getAndSetConnection()
      {
          Jedis conn = factory.getConnection();
          this.connection = conn;
          // If resource is not null means a transaction in progress.
  
          if (settings != null)
          {
              for (String key : settings.keySet())
              {
                  conn.configSet(key, settings.get(key).toString());
              }
          }
          return conn;
      }
docs: Gets the and set connection.
  
  @return the and set connection