从Redis中删除多个值

@param keys 需要删除值对应的键列表
@return 删除个数，0表示无key可删除
768297
public Long del(String... keys) {
		try (Jedis jedis = getJedis()) {
			return jedis.del(keys);
		}
	}
997059
public boolean isOrdered(Iterable<InternalKey> keys)
    {
        Iterator<InternalKey> iterator = keys.iterator();
        if (!iterator.hasNext()) {
            return true;
        }

        InternalKey previous = iterator.next();
        while (iterator.hasNext()) {
            InternalKey next = iterator.next();
            if (compare(previous, next) > 0) {
                return false;
            }
            previous = next;
        }
        return true;
    }
1268422
static Key[] toNativeKeys(List<DatastoreKey> keys) {
    Key[] nativeKeys = new Key[keys.size()];
    for (int i = 0; i < keys.size(); i++) {
      nativeKeys[i] = keys.get(i).nativeKey();
    }
    return nativeKeys;
  }
841543
public static int[] getKeys(int key) {
        int[] keys = {0, 1, 1};
        if (key > 0) {
            // 自定义算Key
            if (key < TEN) {
                keys[0] = key;
                keys[1] = key - key / 2;
                keys[2] = Math.abs(keys[1] - key % keys[1]);
            } else if (key < HUNDRED) {
                keys[0] = key % 10;
                keys[1] = Math.abs(key / 10 - keys[0]) % 9 + 1;
                keys[2] = keys[0] * keys[1] / (keys[0] + keys[1]) % 10;
            } else if (key < THOUSAND) {
                int middle = key % 100 / 10;
                keys[0] = key % 10;
                keys[1] = key / 100;
                keys[2] = ((int) (Math.pow(keys[1], keys[0]) / middle) % 9 + 1);
            } else {
                int length = String.valueOf(key).length();
                keys[0] = key % 10;
                keys[1] = key / (int) Math.pow(10, length - 1);
                length = (keys[0] + keys[1] + keys[0] * keys[1]) % (length - 2) + 2;
                keys[2] = (int) (key % Math.pow(10, length) / Math.pow(10, length - 1));
            }
            keys[2] = keys[2] % 8 + 2;
        }
        return keys;
    }
438603
public void invalidate(Key... keys) {
        for (Key key : keys) {
            logger.debug("Invalidating the response cache key : {} {} {} {}, {}",
                    key.getEntityType(), key.getName(), key.getVersion(), key.getType(), key.getEurekaAccept());

            readWriteCacheMap.invalidate(key);
            Collection<Key> keysWithRegions = regionSpecificKeys.get(key);
            if (null != keysWithRegions && !keysWithRegions.isEmpty()) {
                for (Key keysWithRegion : keysWithRegions) {
                    logger.debug("Invalidating the response cache key : {} {} {} {} {}",
                            key.getEntityType(), key.getName(), key.getVersion(), key.getType(), key.getEurekaAccept());
                    readWriteCacheMap.invalidate(keysWithRegion);
                }
            }
        }
    }
412795
public DeleteObjectsRequest withKeys(String... keys) {
        List<KeyVersion> keyVersions = new ArrayList<KeyVersion>(keys.length);
        for (String key : keys) {
            keyVersions.add(new KeyVersion(key));
        }
        setKeys(keyVersions);
        return this;
    }
263297
def first_key(res):
    
    if not isinstance(res, dict):
        raise ValueError('Value should be of dict type')

    if len(res.keys()) != 1:
        raise RedisClusterException("More then 1 result from command")

    return list(res.values())[0]
185468
@Override
    public V get(Object key) {
        final int index = key == null ? indexOfNull() : indexOf(key, key.hashCode());
        return index >= 0 ? (V)mArray[(index<<1)+1] : null;
    }
22474
def sinterstore(self, dest, keys, *args):
        """"""
        result = self.sinter(keys, *args)
        self.redis[self._encode(dest)] = result
        return len(result)
1365194
public Long del(Object... keys) {
		Jedis jedis = getJedis();
		try {
			return jedis.del(keysToBytesArray(keys));
		}
		finally {close(jedis);}
	}
407182
public Set<K> checkAllPresent(final Iterable<? extends K> keys) {
    Set<K> _keysToLoad = new HashSet<K>();
    for (K k : keys) {
      Entry<K,V> e = lookupEntryNoHitRecord(k);
      if (e == null || !e.hasFreshData(clock)) {
        _keysToLoad.add(k);
      }
    }
    return _keysToLoad;
  }
634940
@SuppressWarnings("rawtypes")
	public List mget(Object... keys) {
		Jedis jedis = getJedis();
		try {
			byte[][] keysBytesArray = keysToBytesArray(keys);
			List<byte[]> data = jedis.mget(keysBytesArray);
			return valueListFromBytesList(data);
		}
		finally {close(jedis);}
	}
429594
public int indexOfKey(Object key) {
        return key == null ? indexOfNull() : indexOf(key, key.hashCode());
    }
814455
public static SortKey[] keys (BagArray keys) {
        SortKey[] sortKeys = new SortKey[keys.getCount ()];
        for (int i = 0, end = keys.getCount (); i < end; ++i) {
            sortKeys[i] = new SortKey (keys.getBagObject (i));
        }
        return sortKeys;
    }
237055
def get(key, default=0)
      with_failure_grace(default) {
        val = @redis.get(key)
        return default if val.nil?
        val.numeric? ? val.to_i : val
      }
    end
813757
private int findKey(K key) {
    int i = 0;
    for (K otherKey : this.keys) {
      if (this.comparator.compare(key, otherKey) == 0) {
        return i;
      }
      i++;
    }
    return -1;
  }
1121815
@SuppressWarnings("deprecation") // The String ctor is deprecated, but fast.
  public Set<String> keys() {
    if (isEmpty()) {
      return Collections.emptySet();
    }
    Set<String> ks = new HashSet<>(size);
    for (int i = 0; i < size; i++) {
      ks.add(new String(name(i), 0 /* hibyte */));
    }
    // immutable in case we decide to change the implementation later.
    return Collections.unmodifiableSet(ks);
  }