Skip to content

Commit

Permalink
Documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SanHalacogluImproving committed Jan 24, 2024
1 parent 0cdf6a6 commit 7f86228
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion java/client/src/main/java/glide/api/RedisClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<RedisClient> CreateClient(RedisClientConfiguration config) {
ThreadPoolResource threadPoolResource = config.getThreadPoolResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ThreadPoolResource> threadPoolSupplier = mock(Supplier.class);
Expand All @@ -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();
}
}

0 comments on commit 7f86228

Please sign in to comment.