package com.tmerclub.cloud.search.canal.support.parser.converter;


/**
 * @author throwable
 * @version v1
 * @description
 * @since 2020/9/22 0:54
 */
public interface CanalFieldConverterFactory {

    /**
     * 注册
     * @param converter
     */
    default void registerConverter(BaseCanalFieldConverter<?> converter) {
        registerConverter(converter, true);
    }

    /**
     * 注册
     * @param converter
     * @param replace
     */
    void registerConverter(BaseCanalFieldConverter<?> converter, boolean replace);

    /**
     * 加载
     * @param input
     * @return
     */
    CanalFieldConvertResult load(CanalFieldConvertInput input);
}
