Skip to content

Commit

Permalink
Change CacheUpdateHandler to extend Configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Aug 20, 2023
1 parent d966239 commit c8aa883
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kcache/src/main/java/io/kcache/CacheUpdateHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,28 @@

import java.util.Map;
import java.util.Optional;
import org.apache.kafka.common.Configurable;
import org.apache.kafka.common.TopicPartition;

import java.io.Closeable;
import java.io.IOException;
import org.apache.kafka.common.header.Headers;
import org.apache.kafka.common.record.TimestampType;

public interface CacheUpdateHandler<K, V> extends Closeable {
public interface CacheUpdateHandler<K, V> extends Configurable, Closeable {

enum ValidationStatus {
SUCCESS,
ROLLBACK_FAILURE,
IGNORE_FAILURE
}

/**
* Configures the cache update handler.
*/
default void configure(Map<String, ?> configs) {
}

/**
* Invoked after the cache is initialized.
*
Expand Down

0 comments on commit c8aa883

Please sign in to comment.