From 7f862283cbfe0d4f7af4989a1ae00fc95a76d35d Mon Sep 17 00:00:00 2001 From: SanHalacogluImproving Date: Wed, 24 Jan 2024 13:44:41 -0800 Subject: [PATCH] Documentation fixes. --- java/client/src/main/java/glide/api/RedisClient.java | 2 +- .../api/models/configuration/BaseClientConfiguration.java | 8 +++----- .../glide/connectors/resources/ThreadPoolResource.java | 4 ++-- .../resources/ThreadPoolResourceAllocatorTest.java | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/java/client/src/main/java/glide/api/RedisClient.java b/java/client/src/main/java/glide/api/RedisClient.java index 6002c9b4ee..5673e6bf63 100644 --- a/java/client/src/main/java/glide/api/RedisClient.java +++ b/java/client/src/main/java/glide/api/RedisClient.java @@ -24,7 +24,7 @@ public class RedisClient extends BaseClient implements BaseCommands { * Request an async (non-blocking) Redis client in Standalone mode. * * @param config - Redis Client Configuration - * @return a future to connect and return a RedisClient + * @return a Future to connect and return a RedisClient */ public static CompletableFuture CreateClient(RedisClientConfiguration config) { ThreadPoolResource threadPoolResource = config.getThreadPoolResource(); diff --git a/java/client/src/main/java/glide/api/models/configuration/BaseClientConfiguration.java b/java/client/src/main/java/glide/api/models/configuration/BaseClientConfiguration.java index 682b2ddbf0..a79f43b67e 100644 --- a/java/client/src/main/java/glide/api/models/configuration/BaseClientConfiguration.java +++ b/java/client/src/main/java/glide/api/models/configuration/BaseClientConfiguration.java @@ -55,11 +55,9 @@ public abstract class BaseClientConfiguration { private final Integer requestTimeout; /** - * Field for customizing the Event Loop Group and Channel Configuration in Netty applications. - * Advanced users can utilize {@link glide.connectors.resources.KQueuePoolResource}/{@link - * glide.connectors.resources.EpollResource} to set their custom event loop group. If not - * explicitly set, the system selects a default based on available resources. Recommended for - * advanced users. + * Advanced users can pass an extended {@link glide.connectors.resources.ThreadPoolResource} to + * pass a user-defined event loop group. Users are responsible for shutting the resource down when + * no longer in use. */ private final ThreadPoolResource threadPoolResource; } diff --git a/java/client/src/main/java/glide/connectors/resources/ThreadPoolResource.java b/java/client/src/main/java/glide/connectors/resources/ThreadPoolResource.java index 040016c60e..badfebf8c8 100644 --- a/java/client/src/main/java/glide/connectors/resources/ThreadPoolResource.java +++ b/java/client/src/main/java/glide/connectors/resources/ThreadPoolResource.java @@ -6,8 +6,8 @@ import lombok.NonNull; /** - * Abstract base class that sets up the EventLoopGroup and channel configuration for Netty - * applications. + * Abstract base class that provides the EventLoopGroup and DomainSocketChannel to be used by the + * Netty protocol. */ @Getter public abstract class ThreadPoolResource { diff --git a/java/client/src/test/java/glide/connectors/resources/ThreadPoolResourceAllocatorTest.java b/java/client/src/test/java/glide/connectors/resources/ThreadPoolResourceAllocatorTest.java index a7a08b8ecd..068d55e5ef 100644 --- a/java/client/src/test/java/glide/connectors/resources/ThreadPoolResourceAllocatorTest.java +++ b/java/client/src/test/java/glide/connectors/resources/ThreadPoolResourceAllocatorTest.java @@ -16,7 +16,7 @@ public class ThreadPoolResourceAllocatorTest { @Test public void getOrCreateReturnsDefault() { - (new ThreadPoolResourceAllocator.ShutdownHook()).run(); + new ThreadPoolResourceAllocator.ShutdownHook().run(); ThreadPoolResource mockedThreadPool = mock(ThreadPoolResource.class); Supplier threadPoolSupplier = mock(Supplier.class); @@ -38,6 +38,6 @@ public void getOrCreateReturnsDefault() { // remove the mocked resource EventLoopGroup mockedELG = mock(EventLoopGroup.class); when(mockedThreadPool.getEventLoopGroup()).thenReturn(mockedELG); - (new ThreadPoolResourceAllocator.ShutdownHook()).run(); + new ThreadPoolResourceAllocator.ShutdownHook().run(); } }