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

ru.ivi.opensource.flinkclickhousesink.model.ClickhouseRequestBlank Maven / Gradle / Ivy

Go to download

There is a newer version: 1.4.0
Show newest version
package ru.ivi.opensource.flinkclickhousesink.model;

import java.util.List;

public class ClickhouseRequestBlank {
    private final List values;
    private final String targetTable;
    private int attemptCounter;

    public ClickhouseRequestBlank(List values, String targetTable) {
        this.values = values;
        this.targetTable = targetTable;
        this.attemptCounter = 0;
    }

    public List getValues() {
        return values;
    }

    public void incrementCounter() {
        this.attemptCounter++;
    }

    public int getAttemptCounter() {
        return attemptCounter;
    }

    public String getTargetTable() {
        return targetTable;
    }

    public static final class Builder {
        private List values;
        private String targetTable;

        private Builder() {
        }

        public static Builder aBuilder() {
            return new Builder();
        }

        public Builder withValues(List values) {
            this.values = values;
            return this;
        }

        public Builder withTargetTable(String targetTable) {
            this.targetTable = targetTable;
            return this;
        }

        public ClickhouseRequestBlank build() {
            return new ClickhouseRequestBlank(values, targetTable);
        }
    }

    @Override
    public String toString() {
        return "ClickhouseRequestBlank{" +
                "values=" + values +
                ", targetTable='" + targetTable + '\'' +
                ", attemptCounter=" + attemptCounter +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy