aloyszhang commented on code in PR #9836: URL: https://github.com/apache/inlong/pull/9836#discussion_r1528322815
########## inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/redis/src/main/java/org/apache/inlong/sort/redis/common/config/RedisLookupOptions.java: ########## @@ -0,0 +1,129 @@ +/* + * 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.inlong.sort.redis.common.config; + +import org.apache.flink.annotation.Internal; + +import java.io.Serializable; +import java.util.Objects; + +/** + * Options for the Redis lookup. + */ +@Internal +public class RedisLookupOptions implements Serializable { + + private static final long serialVersionUID = 1L; + private static final int DEFAULT_MAX_RETRY_TIMES = 3; + + private final long cacheMaxSize; + private final long cacheExpireMs; + private final int maxRetryTimes; + /** + * Asynchronous processing has not been implemented yet, but the entry is reserved + */ + private final boolean lookupAsync; + + public RedisLookupOptions( + long cacheMaxSize, long cacheExpireMs, int maxRetryTimes, boolean lookupAsync) { + this.cacheMaxSize = cacheMaxSize; + this.cacheExpireMs = cacheExpireMs; + this.maxRetryTimes = maxRetryTimes; + this.lookupAsync = lookupAsync; + } + + public static Builder builder() { + return new Builder(); + } + + public long getCacheMaxSize() { + return cacheMaxSize; + } + + public long getCacheExpireMs() { + return cacheExpireMs; + } + + public int getMaxRetryTimes() { + return maxRetryTimes; + } + + public boolean getLookupAsync() { Review Comment: Not used, plz remove -- 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: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org