@Override public byte[] getRange(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); if (start > Integer.MAX_VALUE || end > Integer.MAX_VALUE) { throw new IllegalArgumentException("Start and end must be less than Integer.MAX_VALUE for getRange in Jedis."); } try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().substr(key, (int) start, (int) end), JedisConverters.stringToBytes())); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().substr(key, (int) start, (int) end), JedisConverters.stringToBytes())); return null; } return connection.getJedis().substr(key, (int) start, (int) end); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public byte[] getRange(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); if (start > Integer.MAX_VALUE || end > Integer.MAX_VALUE) { throw new IllegalArgumentException("Start and end must be less than Integer.MAX_VALUE for getRange in Jedis."); } try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().substr(key, (int) start, (int) end), JedisConverters.stringToBytes())); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().substr(key, (int) start, (int) end), JedisConverters.stringToBytes())); return null; } return connection.getJedis().substr(key, (int) start, (int) end); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public byte[] getRange(byte[] key, long start, long end) { Assert.notNull(key, "Key must not be null!"); if (start > Integer.MAX_VALUE || end > Integer.MAX_VALUE) { throw new IllegalArgumentException("Start and end must be less than Integer.MAX_VALUE for getRange in Jedis."); } try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().substr(key, (int) start, (int) end), JedisConverters.stringToBytes())); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().substr(key, (int) start, (int) end), JedisConverters.stringToBytes())); return null; } return connection.getJedis().substr(key, (int) start, (int) end); } catch (Exception ex) { throw convertJedisAccessException(ex); } }