Skip to content

Commit

Permalink
Refactor RecordMapProcessor to include a more generic metadataProcess…
Browse files Browse the repository at this point in the history
…or implementation.
  • Loading branch information
Skaar, Bjørn-Andre committed Feb 9, 2024
1 parent 701327b commit 3357075
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/main/java/no/ssb/dlp/pseudo/core/map/RecordMapProcessor.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
package no.ssb.dlp.pseudo.core.map;

import io.reactivex.processors.FlowableProcessor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import no.ssb.dlp.pseudo.core.field.ValueInterceptorChain;
import org.reactivestreams.Publisher;

import java.util.Map;

@RequiredArgsConstructor
public class RecordMapProcessor<T> {
private final ValueInterceptorChain valueInterceptorChain;
@Getter
private final MetadataProcessor<T> metadataProcessor;
@FunctionalInterface
public interface MetadataProcessor<T> {
// The MetadataProcessor is used to publish/subscribe to events related to the processing of each RecordMap
FlowableProcessor<T> toFlowableProcessor();
}
private final T metadataProcessor;

public Map<String, Object> init(Map<String, Object> r) {
return MapTraverser.traverse(r, valueInterceptorChain::init);
}
Expand Down

0 comments on commit 3357075

Please sign in to comment.