Xuanwo commented on code in PR #3392: URL: https://github.com/apache/incubator-opendal/pull/3392#discussion_r1374041772
########## bindings/java/src/main/java/org/apache/opendal/layer/RetryNativeLayer.java: ########## @@ -0,0 +1,50 @@ +/* + * 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.opendal.layer; + +import java.time.Duration; +import lombok.Builder; +import org.apache.opendal.NativeLayer; + +@Builder +public class RetryNativeLayer extends NativeLayer { + + private final boolean jitter; Review Comment: Is it a good idea to store a `nativeHandle` (the `RetryLayer` in rust core) in `RetryNativeLayer` class and forward all functions to it? So the `doLayer` can be `doLayer(long nativeHandle, long layerHandle)`. Besides, I have two naming things: - How about renaming `nativeHandle` to `nativeOperator` across the whole package? - Do we need to keep `Native` in `RetryNativeLayer`? How about just `RetryLayer`? I feel like users don't need to know about this concept. -- 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]
