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 Apr 19, 2024
1 parent d1865f1 commit 85ab097
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import com.redis.lettucemod.api.StatefulRedisModulesConnection;
import com.redis.lettucemod.api.sync.RedisModulesCommands;
import com.redis.lettucemod.util.RedisModulesUtils;
import com.redis.riot.core.AbstractRunnable;
import com.redis.riot.core.AbstractRedisRunnable;

import io.lettuce.core.metrics.CommandMetrics.CommandLatency;
import io.lettuce.core.metrics.DefaultCommandLatencyCollectorOptions;

public class Ping extends AbstractRunnable {
public class Ping extends AbstractRedisRunnable {

public static final int DEFAULT_ITERATIONS = 1;
public static final int DEFAULT_COUNT = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import io.lettuce.core.codec.RedisCodec;

public abstract class AbstractExport extends AbstractRunnable {
public abstract class AbstractExport extends AbstractRedisRunnable {

private static final String REDIS_VAR = "redis";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import io.lettuce.core.AbstractRedisClient;

public abstract class AbstractImport extends AbstractRunnable {
public abstract class AbstractImport extends AbstractRedisRunnable {

private RedisWriterOptions writerOptions = new RedisWriterOptions();
private EvaluationContextOptions evaluationContextOptions = new EvaluationContextOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.lettuce.core.AbstractRedisClient;
import io.lettuce.core.RedisURI;

public abstract class AbstractRunnable extends AbstractJobRunnable {
public abstract class AbstractRedisRunnable extends AbstractJobRunnable {

private RedisClientOptions redisClientOptions = new RedisClientOptions();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.redis.spring.batch.KeyValue;
import com.redis.spring.batch.RedisItemWriter;

public abstract class AbstractStructImport extends AbstractRunnable {
public abstract class AbstractStructImport extends AbstractRedisRunnable {

private RedisWriterOptions writerOptions = new RedisWriterOptions();

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ latencyutilsVersion = 2.0.3
lettucemodVersion = 3.7.3
picocliVersion = 4.7.5
progressbarVersion = 0.10.0
springBatchRedisVersion = 4.1.3
springBatchRedisVersion = 4.1.4
testcontainersRedisVersion = 2.2.0

org.gradle.daemon = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.springframework.batch.item.ItemReader;

import com.redis.riot.core.AbstractExport;
import com.redis.riot.core.AbstractRunnable;
import com.redis.riot.core.AbstractRedisRunnable;
import com.redis.spring.batch.RedisItemReader;
import com.redis.spring.batch.RedisItemReader.ReaderMode;
import com.redis.spring.batch.reader.ScanSizeEstimator;
Expand All @@ -21,7 +21,7 @@ public abstract class AbstractExportCommand extends AbstractJobCommand {
KeyValueProcessorArgs processorArgs = new KeyValueProcessorArgs();

@Override
protected AbstractRunnable runnable() {
protected AbstractRedisRunnable runnable() {
AbstractExport export = exportRunnable();
export.setReaderOptions(readerArgs.readerOptions());
export.setProcessorOptions(processorArgs.processorOptions());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.springframework.util.ClassUtils;

import com.redis.riot.core.AbstractJobRunnable;
import com.redis.riot.core.AbstractRunnable;
import com.redis.riot.core.AbstractRedisRunnable;

import me.tongfei.progressbar.DelegatingProgressBarConsumer;
import me.tongfei.progressbar.ProgressBarBuilder;
Expand Down Expand Up @@ -81,7 +81,7 @@ private ProgressBarStyle progressBarStyle() {

@Override
public void run() {
AbstractRunnable runnable = runnable();
AbstractRedisRunnable runnable = runnable();
if (name != null) {
runnable.setName(name);
}
Expand Down Expand Up @@ -128,6 +128,6 @@ protected LongSupplier initialMaxSupplier(String stepName, ItemReader<?> reader)
return () -> ProgressStepExecutionListener.UNKNOWN_SIZE;
}

protected abstract AbstractRunnable runnable();
protected abstract AbstractRedisRunnable runnable();

}

0 comments on commit 85ab097

Please sign in to comment.