PipelineCluster extends JedisCluster { public Long mdel(final List<String> keys) { if (keys == null || keys.isEmpty()) { return null; } return new PipelineClusterCommand<Long>(this, connectionHandler) { @Override public void pipelineCommand(Pipeline pipeline, List<String> pipelineKeys) { for (String key : pipelineKeys) { pipeline.del(key); } } @Override public Long getResult(Map<String, Object> resultMap) { Long result = 0L; if (resultMap == null || resultMap.isEmpty()) { return result; } for (Map.Entry<String, Object> entry : resultMap.entrySet()) { String key = entry.getKey(); Object object = entry.getValue(); if (object == null) { continue; } if (checkException(object)) { try { Long value = pipelineCluster.del(key); if (value != null) { result++; } } catch (Exception e) { logger.error(e.getMessage(), e); } } else { result++; } } return result; } }.run(keys); } PipelineCluster(GenericObjectPoolConfig poolConfig, Set<HostAndPort> nodes, int timeout);  PipelineCluster(GenericObjectPoolConfig poolConfig, Set<HostAndPort> nodes);  PipelineCluster(GenericObjectPoolConfig poolConfig, Set<HostAndPort> jedisClusterNode, int timeout,
                           int maxRedirections); String set(final String key, final byte[] value); String set(final String key, final byte[] value, final String expx, final long time); byte[] getBytes(final String key); Boolean setbit(final String key, final long offset,
                          final byte[] value); Long setrange(final String key, final long offset, final byte[] value); byte[] getrangeBytes(final String key, final long startOffset, final long endOffset); byte[] getSetBytes(final String key, final byte[] value); Long setnx(final String key, final byte[] value); String setex(final String key, final int seconds, final byte[] value); byte[] substrBytes(final String key, final int start, final int end); Long hset(final String key, final String field, final byte[] value); byte[] hgetBytes(final String key, final String field); Long hsetnx(final String key, final String field, final byte[] value); String hmsetBytes(final String key, final Map<byte[], byte[]> hash); List<byte[]> hmget(final String key, final byte[]... fields); Set<byte[]> hkeysBytes(final String key); List<byte[]> hvalsBytes(final String key); Map<byte[], byte[]> hgetAllBytes(final String key); Long rpush(final String key, final byte[]... string); Long lpush(final String key, final byte[]... string); List<byte[]> lrangeBytes(final String key, final long start, final long end); byte[] lindexBytes(final String key, final long index); String lset(final String key, final long index, final byte[] value); Long lrem(final String key, final long count, final byte[] value); byte[] lpopBytes(final String key); byte[] rpopBytes(final String key); Long sadd(final String key, final byte[]... member); Set<byte[]> smembersBytes(final String key); Long srem(final String key, final byte[]... member); byte[] spopBytes(final String key); Boolean sismember(final String key, final byte[] member); byte[] srandmemberBytes(final String key); Long zadd(final String key, final double score, final byte[] member); Set<byte[]> zrangeBytes(final String key, final long start, final long end); Long zrem(final String key, final byte[]... member); Double zincrby(final String key, final double score,
                          final byte[] member); Long zrank(final String key, final byte[] member); Long zrevrank(final String key, final byte[] member); Set<byte[]> zrevrangeBytes(final String key, final long start,
                                      final long end); Set<Tuple> zrangeWithScoresBytes(final String key, final long start, final long end); Set<Tuple> zrevrangeWithScoresBytes(final String key, final long start, final long end); Double zscore(final String key, final byte[] member); List<byte[]> sortBytes(final String key); List<byte[]> sortBytes(final String key, final SortingParams sortingParameters); Set<byte[]> zrangeByScoreBytes(final String key, final double min, final double max); Set<byte[]> zrangeByScoreBytes(final String key, final String min, final String max); Set<byte[]> zrevrangeByScoreBytes(final String key, final double max, final double min); Set<byte[]> zrangeByScoreBytes(final String key, final double min,
                                          final double max, final int offset, final int count); Set<byte[]> zrevrangeByScoreBytes(final String key, final String max, final String min); Set<byte[]> zrangeByScoreBytes(final String key, final String min,
                                          final String max, final int offset, final int count); Set<byte[]> zrevrangeByScoreBytes(final String key, final double max,
                                             final double min, final int offset, final int count); Set<byte[]> zrevrangeByScoreBytes(final String key, final String max,
                                             final String min, final int offset, final int count); Long linsert(final String key, final BinaryClient.LIST_POSITION where,
                        final byte[] pivot, final byte[] value); Long lpushx(final String key, final byte[]... string); Long rpushx(final String key, final byte[]... string); List<byte[]> blpopBytes(final String arg); List<byte[]> brpopBytes(final String arg); Map<String, String> mget(final List<String> keys); Map<String, Long> mexpire(final Map<String, Integer> keyTimeMap); Map<String,Map<String,String>> mHgetAll(List<String> keys); Map<String,String> mhmset(final Map<String,Map<String,String>> keyValueMap); String mset(final Map<String, String> keyValueMap); Long mdel(final List<String> keys); Map<String, Long> mzadd(final Map<String, SortedSetVO> map); Map<String, Long> mzadds(final Map<String, Map<String, Double>> map); Map<String, Set<String>> mzrangeByScore(final List<String> keys, final double min,
                                                   final double max); Map<String, Set<String>> mzrangeByScore(final Map<String, RangeScoreVO> keyScoreMap); Map<String, Set<String>> mzrangeByScore(final List<String> keys, final String min,
                                                   final String max); String mzremrangeByScore(final Map<String, RangeScoreVO> keyScoreMap); Map<String, byte[]> mgetBytes(final List<String> keys); String msetBytes(final Map<String, byte[]> keyValueMap); Long publish(final String channel, final String message); Long publish(final String channel, final byte[] message); void subscribe(final JedisPubSub jedisPubSub, final String channel, final int timeout); Object evalsha(String sha, String key, String... args); Object evalsha(String sha, String key); Object eval(String sha, String key, String... args); Object eval(String sha, String key); String loadScruptAllNodes(String script); ScanResult<String> sscan(final String key, final String cursor, final ScanParams params); ScanResult<byte[]> sscan(final byte[] key, final byte[] cursor, final ScanParams params);  }
@Test public void testMdel() throws Exception { long deleteCount = pipelineCluster.mdel(keys); System.out.println(deleteCount); }