hailin0 commented on code in PR #2478: URL: https://github.com/apache/incubator-seatunnel/pull/2478#discussion_r950825550
########## seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinatorConfiguration.java: ########## @@ -0,0 +1,143 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.checkpoint; + +import static com.google.common.base.Preconditions.checkArgument; + +import java.io.Serializable; +import java.util.Objects; + +public class CheckpointCoordinatorConfiguration implements Serializable { + private static final long serialVersionUID = 1L; + + public static final long MINIMAL_CHECKPOINT_TIME = 10; + + private final long checkpointInterval; + + private final long checkpointTimeout; + + private final int maxConcurrentCheckpoints; + + private final int tolerableFailureCheckpoints; + + private CheckpointCoordinatorConfiguration(long checkpointInterval, + long checkpointTimeout, + int maxConcurrentCheckpoints, + int tolerableFailureCheckpoints) { + this.checkpointInterval = checkpointInterval; + this.checkpointTimeout = checkpointTimeout; + this.maxConcurrentCheckpoints = maxConcurrentCheckpoints; + this.tolerableFailureCheckpoints = tolerableFailureCheckpoints; + } + + public long getCheckpointInterval() { + return checkpointInterval; + } + + public long getCheckpointTimeout() { + return checkpointTimeout; + } + + public int getMaxConcurrentCheckpoints() { + return maxConcurrentCheckpoints; + } + + public int getTolerableFailureCheckpoints() { + return tolerableFailureCheckpoints; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckpointCoordinatorConfiguration that = (CheckpointCoordinatorConfiguration) o; + return checkpointInterval == that.checkpointInterval + && checkpointTimeout == that.checkpointTimeout + && maxConcurrentCheckpoints == that.maxConcurrentCheckpoints + && tolerableFailureCheckpoints == that.tolerableFailureCheckpoints; + } + + @Override + public int hashCode() { Review Comment: > I don't recommend or oppose lombok in open source components; agree with you. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
