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

com.neko233.toolchain.storage.wal.impl.LogDefaultWalV1 Maven / Gradle / Ivy

package com.neko233.toolchain.storage.wal.impl;

import com.alibaba.fastjson2.JSON;
import com.neko233.toolchain.storage.wal.DefaultWalV1;
import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.util.List;

/**
 * Just a Demo
 *
 * @author SolarisNeko
 * Date on 2023-01-29
 */
@Slf4j
public class LogDefaultWalV1 extends DefaultWalV1 {
    /**
     * @param templateFilePath 模板文件, 可不存在的
     * @param dataSchema       数据结构
     * @throws Exception 参数检查异常
     */
    public LogDefaultWalV1(File templateFilePath, Class dataSchema) throws Exception {
        super(templateFilePath, dataSchema);
    }

    @Override
    public void flush(List toConsumeDataList) throws Exception {
        for (D d : toConsumeDataList) {
            log.info(JSON.toJSONString(d));
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy