Tabnine Logo
LettuceReactiveClusterHyperLogLogCommands
Code IndexAdd Tabnine to your IDE (free)

How to use
LettuceReactiveClusterHyperLogLogCommands
in
org.springframework.data.redis.connection.lettuce

Best Java code snippets using org.springframework.data.redis.connection.lettuce.LettuceReactiveClusterHyperLogLogCommands (Showing top 9 results out of 315)

origin: spring-projects/spring-data-redis

@Override
public LettuceReactiveClusterHyperLogLogCommands hyperLogLogCommands() {
  return new LettuceReactiveClusterHyperLogLogCommands(this);
}
origin: spring-projects/spring-data-redis

@Override
public Flux<BooleanResponse<PfMergeCommand>> pfMerge(Publisher<PfMergeCommand> commands) {
  return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> {
    Assert.notNull(command.getKey(), "Key must not be null for PFMERGE");
    Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty for PFMERGE!");
    List<ByteBuffer> keys = new ArrayList<>(command.getSourceKeys());
    keys.add(command.getKey());
    if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys.toArray(new ByteBuffer[keys.size()]))) {
      return super.pfMerge(Mono.just(command));
    }
    return Mono
        .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFMERGE in cluster mode."));
  }));
}
origin: spring-projects/spring-data-redis

  @Override
  public Flux<NumericResponse<PfCountCommand, Long>> pfCount(Publisher<PfCountCommand> commands) {

    return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> {

      Assert.notEmpty(command.getKeys(), "Keys must be null or empty for PFCOUNT!");

      if (ClusterSlotHashUtil
          .isSameSlotForAllKeys(command.getKeys().toArray(new ByteBuffer[command.getKeys().size()]))) {
        return super.pfCount(Mono.just(command));
      }

      return Mono
          .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFCOUNT in cluster mode."));
    }));
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public LettuceReactiveClusterHyperLogLogCommands hyperLogLogCommands() {
  return new LettuceReactiveClusterHyperLogLogCommands(this);
}
origin: org.springframework.data/spring-data-redis

@Override
public Flux<BooleanResponse<PfMergeCommand>> pfMerge(Publisher<PfMergeCommand> commands) {
  return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> {
    Assert.notNull(command.getKey(), "Key must not be null for PFMERGE");
    Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty for PFMERGE!");
    List<ByteBuffer> keys = new ArrayList<>(command.getSourceKeys());
    keys.add(command.getKey());
    if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys.toArray(new ByteBuffer[keys.size()]))) {
      return super.pfMerge(Mono.just(command));
    }
    return Mono
        .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFMERGE in cluster mode."));
  }));
}
origin: apache/servicemix-bundles

@Override
public LettuceReactiveClusterHyperLogLogCommands hyperLogLogCommands() {
  return new LettuceReactiveClusterHyperLogLogCommands(this);
}
origin: apache/servicemix-bundles

@Override
public Flux<BooleanResponse<PfMergeCommand>> pfMerge(Publisher<PfMergeCommand> commands) {
  return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> {
    Assert.notNull(command.getKey(), "Key must not be null for PFMERGE");
    Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty for PFMERGE!");
    List<ByteBuffer> keys = new ArrayList<>(command.getSourceKeys());
    keys.add(command.getKey());
    if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys.toArray(new ByteBuffer[keys.size()]))) {
      return super.pfMerge(Mono.just(command));
    }
    return Mono
        .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFMERGE in cluster mode."));
  }));
}
origin: org.springframework.data/spring-data-redis

  @Override
  public Flux<NumericResponse<PfCountCommand, Long>> pfCount(Publisher<PfCountCommand> commands) {

    return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> {

      Assert.notEmpty(command.getKeys(), "Keys must be null or empty for PFCOUNT!");

      if (ClusterSlotHashUtil
          .isSameSlotForAllKeys(command.getKeys().toArray(new ByteBuffer[command.getKeys().size()]))) {
        return super.pfCount(Mono.just(command));
      }

      return Mono
          .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFCOUNT in cluster mode."));
    }));
  }
}
origin: apache/servicemix-bundles

  @Override
  public Flux<NumericResponse<PfCountCommand, Long>> pfCount(Publisher<PfCountCommand> commands) {

    return getConnection().execute(cmd -> Flux.from(commands).concatMap(command -> {

      Assert.notEmpty(command.getKeys(), "Keys must be null or empty for PFCOUNT!");

      if (ClusterSlotHashUtil
          .isSameSlotForAllKeys(command.getKeys().toArray(new ByteBuffer[command.getKeys().size()]))) {
        return super.pfCount(Mono.just(command));
      }

      return Mono
          .error(new InvalidDataAccessApiUsageException("All keys must map to same slot for PFCOUNT in cluster mode."));
    }));
  }
}
org.springframework.data.redis.connection.lettuceLettuceReactiveClusterHyperLogLogCommands

Most used methods

  • <init>
    Create new LettuceReactiveClusterHyperLogLogCommands.
  • getConnection

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now