szetszwo commented on code in PR #1106: URL: https://github.com/apache/ratis/pull/1106#discussion_r1622823140
########## ratis-common/src/main/java/org/apache/ratis/util/ReferenceCountedObject.java: ########## @@ -152,6 +153,10 @@ public boolean release() { }; } + default <V> ReferenceCountedObject<V> map(Function<T, V> mapper) { Review Comment: Let's call it `apply(..)`, which is similar to https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html#thenApply-java.util.function.Function- Also, please add javadoc ```java /** * @return a {@link ReferenceCountedObject} by apply the given function to this object. */ default <V> ReferenceCountedObject<V> apply(Function<T, V> function) { ``` ########## ratis-server-api/src/main/java/org/apache/ratis/statemachine/TransactionContext.java: ########## @@ -60,7 +60,10 @@ public interface TransactionContext { /** * Returns the data from the {@link StateMachine} * @return the data from the {@link StateMachine} + * @deprecated access StateMachineLogEntry via @{@link TransactionContext#getLogEntryRef()} or + * @{@link TransactionContext#getLogEntryUnsafe} Review Comment: Typos: - `@{@link ...}` -> `{@link ...}` for both links. - The second link needs `()`. ```java * @deprecated access StateMachineLogEntry via {@link TransactionContext#getLogEntryRef()} * or {@link TransactionContext#getLogEntryUnsafe()} ``` -- 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: issues-unsubscr...@ratis.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org