@Override public String hmset(final String key, final Map<String, String> hash) { try { String field = null, value = null; String[] args = new String[(hash.size() - 1)*2]; int idx = 0; for (String f : hash.keySet()) { if (field == null) { field = f; value = hash.get(f); continue; } args[idx] = f; args[idx + 1] = hash.get(f); idx += 2; } return redis.hmset(key, field, value, args); } catch (Exception e) { throw new JedisException(e); } }
@Override public String hmset(final String key, final Map<String, String> hash) { try { String field = null, value = null; String[] args = new String[(hash.size() - 1)*2]; int idx = 0; for (String f : hash.keySet()) { if (field == null) { field = f; value = hash.get(f); continue; } args[idx] = f; args[idx + 1] = hash.get(f); idx += 2; } return redis.hmset(key, field, value, args); } catch (Exception e) { throw new JedisException(e); } }
@Override public String hmset(final String key, final Map<String, String> hash) { try { String field = null, value = null; String[] args = new String[(hash.size() - 1)*2]; int idx = 0; for (String f : hash.keySet()) { if (field == null) { field = f; value = hash.get(f); continue; } args[idx] = f; args[idx + 1] = hash.get(f); idx += 2; } return redis.hmset(key, field, value, args); } catch (Exception e) { throw new JedisException(e); } }
@Override public String hmset(final String key, final Map<String, String> hash) { try { String field = null, value = null; String[] args = new String[(hash.size() - 1) * 2]; int idx = 0; for (String f : hash.keySet()) { if (field == null) { field = f; value = hash.get(f); continue; } args[idx] = f; args[idx + 1] = hash.get(f); idx += 2; } return redis.hmset(key, field, value, args); } catch (Exception e) { throw new JedisException(e); } }