All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.quasardb.kafka.common.resolver.StaticResolver Maven / Gradle / Ivy

There is a newer version: 3.14.1
Show newest version
package net.quasardb.kafka.common.resolver;

import java.util.Collection;
import java.util.Map;
import java.util.HashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.kafka.connect.sink.SinkRecord;
import org.apache.kafka.connect.errors.DataException;

public class StaticResolver extends Resolver {

    private static final Logger log = LoggerFactory.getLogger(StaticResolver.class);

    private T value;

    public StaticResolver(T value) {
        log.debug("Initializing static resolver with value '" + value.toString() + "'");
        this.value = value;
    }


    @Override
    public T resolve(SinkRecord record) throws DataException {
        return this.value;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy