Skip to content

Commit

Permalink
deps: Upgraded spring batch redis
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Jul 14, 2023
1 parent f543750 commit 90d6d3f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ protected RiotStep<Map<String, Object>, Map<String, Object>> step(CommandContext
private ItemWriter<Map<String, Object>> writer(CommandContext context) {
Assert.notNull(redisCommands, "RedisCommands not set");
Assert.isTrue(!redisCommands.isEmpty(), "No Redis command specified");
Builder<String, String> writer = OperationItemWriter.client(context.getRedisClient());
Builder<String, String> writer = OperationItemWriter.builder(context.getRedisClient());
configure(writer);
return writer(redisCommands.stream().map(OperationCommand::operation).map(writer::operation)
return writer(redisCommands.stream().map(OperationCommand::operation).map(writer::build)
.collect(Collectors.toList()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class RedisReaderOptions {
@Option(names = "--key-slots", arity = "1..*", description = "Key slot ranges to filter keyspace notifications.", paramLabel = "<range>")
private List<IntRange> keySlots = new ArrayList<>();

@Option(names = "--mem-limit", description = "Maximum memory usage in MB for a key to be read (default: ${DEFAULT-VALUE}). Use 0 to disable memory usage checks.", paramLabel = "<MB>")
@Option(names = "--mem-limit", description = "Maximum memory usage in MB for a key to be read. Use 0 to disable memory usage checks (default: 0).", paramLabel = "<MB>")
private long memLimit = MemoryUsageOptions.DEFAULT_LIMIT.toMegabytes();

@Option(names = "--mem-samples", description = "Number of memory usage samples for a key (default: ${DEFAULT-VALUE}).", paramLabel = "<int>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class NoopCommand implements OperationCommand<Map<String, Object>> {
private HelpOptions helpOptions = new HelpOptions();

@Override
public Noop<String, String, Map<String, Object>, Object> operation() {
public Noop<String, String, Map<String, Object>> operation() {
return new Noop<>();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.redis.riot.cli.operation;

import com.redis.spring.batch.common.Operation;
import com.redis.spring.batch.writer.WriteOperation;

public interface OperationCommand<T> {

Operation<String, String, T, Object> operation();
WriteOperation<String, String, T> operation();

}

0 comments on commit 90d6d3f

Please sign in to comment.