io.lettuce.core.Range Java Examples

The following examples show how to use io.lettuce.core.Range. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 6 votes vote down vote up
@Override
public List<ScoredValue<V>> zrevrangebyscoreWithScores(K key,
    Range<? extends Number> range, Limit
    limit) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  try {
    return commands.zrevrangebyscoreWithScores(key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #2
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 6 votes vote down vote up
@Override
public Long zrevrangebyscoreWithScores(
    ScoredValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  try {
    return commands.zrevrangebyscoreWithScores(channel, key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #3
Source File: TracingRedisAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<List<StreamMessage<K, V>>> xrevrange(K key, Range<String> range, Limit limit) {
  Span span = helper.buildSpan("xrevrange", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  return prepareRedisFuture(commands.xrevrange(key, range, limit), span);
}
 
Example #4
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public List<V> zrevrangebylex(K key, Range<? extends V> range) {
  Span span = helper.buildSpan("zrevrangebylex", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zrevrangebylex(key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #5
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zremrangebyscore(K key, Range<? extends Number> range) {
  Span span = helper.buildSpan("zremrangebyscore", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zremrangebyscore(key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #6
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel,
    K key, Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  try {
    return commands.zrangebyscoreWithScores(channel, key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #7
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscore(ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrangebyscore", key);
  span.setTag("range", range == null ? "null" : range.toString());
  span.setTag("limit", limit == null ? "null" : limit.toString());
  try {
    return commands.zrangebyscore(channel, key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #8
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel,
    K key, Range<? extends Number> range) {
  Span span = helper.buildSpan("zrangebyscoreWithScores", key);
  span.setTag("range", range == null ? "null" : range.toString());
  try {
    return commands.zrangebyscoreWithScores(channel, key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #9
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public List<V> zrangebyscore(K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrangebyscore", key);
  span.setTag("range", range == null ? "null" : range.toString());
  try {
    return commands.zrangebyscore(key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #10
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(
    K key, Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  return prepareRedisFuture(commands.zrevrangebyscoreWithScores(key, range, limit), span);
}
 
Example #11
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public List<V> zrevrangebylex(K key, Range<? extends V> range,
    Limit limit) {
  Span span = helper.buildSpan("zrevrangebylex", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  try {
    return commands.zrevrangebylex(key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #12
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscore(ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrangebyscore", key);
  span.setTag("range", range == null ? "null" : range.toString());
  span.setTag("limit", limit == null ? "null" : limit.toString());
  try {
    return commands.zrangebyscore(channel, key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #13
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<List<ScoredValue<V>>> zrevrangebyscoreWithScores(
    K key, Range<? extends Number> range) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  return prepareRedisFuture(commands.zrevrangebyscoreWithScores(key, range), span);
}
 
Example #14
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrevrangebyscore(ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrevrangebyscore", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zrevrangebyscore(channel, key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #15
Source File: TracingRedisAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<List<V>> zrevrangebylex(K key,
    Range<? extends V> range, Limit limit) {
  Span span = helper.buildSpan("zrevrangebylex", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  return prepareRedisFuture(commands.zrevrangebylex(key, range, limit), span);
}
 
Example #16
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscore(ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrangebyscore", key);
  span.setTag("range", range == null ? "null" : range.toString());
  try {
    return commands.zrangebyscore(channel, key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #17
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<Long> zrevrangebyscoreWithScores(
    ScoredValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  return prepareRedisFuture(commands.zrevrangebyscoreWithScores(channel, key, range, limit),
      span);
}
 
Example #18
Source File: TracingRedisAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<List<V>> zrangebylex(K key,
    Range<? extends V> range) {
  Span span = helper.buildSpan("zrangebylex", key);
  span.setTag("range", nullable(range));
  return prepareRedisFuture(commands.zrangebylex(key, range), span);
}
 
Example #19
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public List<V> zrevrangebylex(K key, Range<? extends V> range) {
  Span span = helper.buildSpan("zrevrangebylex", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zrevrangebylex(key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #20
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public List<V> zrevrangebylex(K key, Range<? extends V> range) {
  Span span = helper.buildSpan("zrevrangebylex", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zrevrangebylex(key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #21
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zremrangebylex(K key, Range<? extends V> range) {
  Span span = helper.buildSpan("zremrangebylex", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zremrangebylex(key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #22
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrevrangebyscore(ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrevrangebyscore", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zrevrangebyscore(channel, key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #23
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<Long> zcount(K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zcount", key);
  span.setTag("range", nullable(range));
  return prepareRedisFuture(commands.zcount(key, range), span);
}
 
Example #24
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<Long> zrevrangebyscoreWithScores(
    ScoredValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  return prepareRedisFuture(commands.zrevrangebyscoreWithScores(channel, key, range), span);
}
 
Example #25
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrevrangebyscoreWithScores(
    ScoredValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrevrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  try {
    return commands.zrevrangebyscoreWithScores(channel, key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #26
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<Long> zrangebyscore(
    ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrangebyscore", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  return prepareRedisFuture(commands.zrangebyscore(channel, key, range, limit), span);
}
 
Example #27
Source File: TracingRedisCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrevrangebyscore(ValueStreamingChannel<V> channel, K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrevrangebyscore", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  try {
    return commands.zrevrangebyscore(channel, key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #28
Source File: TracingRedisAdvancedClusterAsyncCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public RedisFuture<List<V>> zrangebyscore(K key,
    Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrangebyscore", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  return prepareRedisFuture(commands.zrangebyscore(key, range, limit), span);
}
 
Example #29
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel,
    K key, Range<? extends Number> range, Limit limit) {
  Span span = helper.buildSpan("zrangebyscoreWithScores", key);
  span.setTag("range", nullable(range));
  span.setTag("limit", nullable(limit));
  try {
    return commands.zrangebyscoreWithScores(channel, key, range, limit);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
Example #30
Source File: TracingRedisAdvancedClusterCommands.java    From java-redis-client with Apache License 2.0 5 votes vote down vote up
@Override
public Long zrangebyscoreWithScores(ScoredValueStreamingChannel<V> channel,
    K key, Range<? extends Number> range) {
  Span span = helper.buildSpan("zrangebyscoreWithScores", key);
  span.setTag("range", range == null ? "null" : range.toString());
  try {
    return commands.zrangebyscoreWithScores(channel, key, range);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}