public static class DefaultClientResources.Builder extends Object
DefaultClientResources
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultClientResources |
build() |
DefaultClientResources.Builder |
commandLatencyCollector(CommandLatencyCollector commandLatencyCollector)
Sets the
CommandLatencyCollector that can that can be used across different instances of the RedisClient. |
DefaultClientResources.Builder |
commandLatencyCollectorOptions(CommandLatencyCollectorOptions commandLatencyCollectorOptions)
Sets the
CommandLatencyCollectorOptions that can that can be used across different instances of the
RedisClient. |
DefaultClientResources.Builder |
commandLatencyPublisherOptions(EventPublisherOptions commandLatencyPublisherOptions)
Sets the
EventPublisherOptions to publish command latency metrics using the EventBus . |
DefaultClientResources.Builder |
computationThreadPoolSize(int computationThreadPoolSize)
Sets the thread pool size (number of threads to use) for computation operations (default value is the number of
CPUs).
|
DefaultClientResources.Builder |
dnsResolver(DnsResolver dnsResolver)
Sets the
DnsResolver that can that can be used across different instances of the RedisClient to resolve
hostnames to InetAddress . |
DefaultClientResources.Builder |
eventBus(EventBus eventBus)
Sets the
EventBus that can that can be used across different instances of the RedisClient. |
DefaultClientResources.Builder |
eventExecutorGroup(EventExecutorGroup eventExecutorGroup)
Sets a shared
event executor group that can be used across different instances of the
RedisClient. |
DefaultClientResources.Builder |
eventLoopGroupProvider(EventLoopGroupProvider eventLoopGroupProvider)
Sets a shared
event executor provider that can be used across different instances of
the RedisClient. |
DefaultClientResources.Builder |
ioThreadPoolSize(int ioThreadPoolSize)
Sets the thread pool size (number of threads to use) for I/O operations (default value is the number of CPUs).
|
public DefaultClientResources.Builder ioThreadPoolSize(int ioThreadPoolSize)
eventLoopGroupProvider
is provided.ioThreadPoolSize
- the thread pool sizepublic DefaultClientResources.Builder eventLoopGroupProvider(EventLoopGroupProvider eventLoopGroupProvider)
event executor provider
that can be used across different instances of
the RedisClient. The provided EventLoopGroupProvider
instance will not be shut down when shutting down the
client resources. You have to take care of that. This is an advanced configuration that should only be used if you
know what you are doing.eventLoopGroupProvider
- the shared eventLoopGroupProviderpublic DefaultClientResources.Builder computationThreadPoolSize(int computationThreadPoolSize)
eventExecutorGroup
is provided.computationThreadPoolSize
- the thread pool sizepublic DefaultClientResources.Builder eventExecutorGroup(EventExecutorGroup eventExecutorGroup)
event executor group
that can be used across different instances of the
RedisClient. The provided EventExecutorGroup
instance will not be shut down when shutting down the client
resources. You have to take care of that. This is an advanced configuration that should only be used if you know what
you are doing.eventExecutorGroup
- the shared eventExecutorGrouppublic DefaultClientResources.Builder eventBus(EventBus eventBus)
EventBus
that can that can be used across different instances of the RedisClient.eventBus
- the event buspublic DefaultClientResources.Builder commandLatencyPublisherOptions(EventPublisherOptions commandLatencyPublisherOptions)
EventPublisherOptions
to publish command latency metrics using the EventBus
.commandLatencyPublisherOptions
- the EventPublisherOptions
to publish command latency metrics using the
EventBus
.public DefaultClientResources.Builder commandLatencyCollectorOptions(CommandLatencyCollectorOptions commandLatencyCollectorOptions)
CommandLatencyCollectorOptions
that can that can be used across different instances of the
RedisClient. The options are only effective if no commandLatencyCollector
is provided.commandLatencyCollectorOptions
- the command latency collector optionspublic DefaultClientResources.Builder commandLatencyCollector(CommandLatencyCollector commandLatencyCollector)
CommandLatencyCollector
that can that can be used across different instances of the RedisClient.commandLatencyCollector
- the command latency collectorpublic DefaultClientResources.Builder dnsResolver(DnsResolver dnsResolver)
DnsResolver
that can that can be used across different instances of the RedisClient to resolve
hostnames to InetAddress
.dnsResolver
- the DNS resolver, must not be null
.public DefaultClientResources build()
DefaultClientResources
.Copyright © 2016. All rights reserved.