Skip to content

Commit

Permalink
feat: Added logging for replicated keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Apr 21, 2024
1 parent a50daf6 commit e1ac507
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.redis.riot.core;

import java.util.function.Consumer;

import org.springframework.batch.core.ItemWriteListener;
import org.springframework.batch.item.Chunk;

public class LoggingWriteListener<T> implements ItemWriteListener<T> {

private final Consumer<Chunk<? extends T>> consumer;

public LoggingWriteListener(Consumer<Chunk<? extends T>> log) {
this.consumer = log;
}

@Override
public void afterWrite(Chunk<? extends T> items) {
consumer.accept(items);
}

}

0 comments on commit e1ac507

Please sign in to comment.