public interface ClientResources
ClientResources
can be shared across different client instances. Shared instances are not shut down by the client, only dedicated instances
are shut down.
This interface defines the contract. See the DefaultClientResources class for the default implementation.
The ClientResources instance is stateful. You have to shutdown the instance if you're no longer using it.
ClientResources provide:
EventLoopGroupProvider to obtain particular EventLoopGroupsEventExecutorGroup for performing internal computation tasks| Modifier and Type | Method and Description |
|---|---|
CommandLatencyCollector |
commandLatencyCollector()
Returns the
CommandLatencyCollector. |
EventPublisherOptions |
commandLatencyPublisherOptions()
Returns the
EventPublisherOptions for latency event publishing. |
int |
computationThreadPoolSize()
Returns the pool size (number of threads) for all computation tasks.
|
DnsResolver |
dnsResolver()
Returns the
DnsResolver. |
EventBus |
eventBus()
Returns the event bus used to publish events.
|
EventExecutorGroup |
eventExecutorGroup()
Returns the computation pool used for internal operations.
|
EventLoopGroupProvider |
eventLoopGroupProvider()
Returns the
EventLoopGroupProvider that provides access to the particular event loop groups. lettuce requires at least two implementations: NioEventLoopGroup for
TCP/IP connections and EpollEventLoopGroup for unix domain socket connections (epoll). |
int |
ioThreadPoolSize()
Returns the pool size (number of threads) for IO threads.
|
Delay |
reconnectDelay()
Returns the
Delay for reconnect attempts. |
Future<Boolean> |
shutdown()
Shutdown the
ClientResources. |
Future<Boolean> |
shutdown(long quietPeriod,
long timeout,
TimeUnit timeUnit)
Shutdown the
ClientResources. |
Future<Boolean> shutdown()
ClientResources.Future<Boolean> shutdown(long quietPeriod, long timeout, TimeUnit timeUnit)
ClientResources.quietPeriod - the quiet period as described in the documentationtimeout - the maximum amount of time to wait until the executor is shutdown regardless if a task was submitted
during the quiet periodtimeUnit - the unit of quietPeriod and timeoutEventLoopGroupProvider eventLoopGroupProvider()
EventLoopGroupProvider that provides access to the particular event loop groups. lettuce requires at least two implementations: NioEventLoopGroup for
TCP/IP connections and EpollEventLoopGroup for unix domain socket connections (epoll).
You can use DefaultEventLoopGroupProvider as default implementation or implement an own
EventLoopGroupProvider to share existing EventLoopGroup's with lettuce.EventLoopGroupProvider which provides access to the particular event loop groupsEventExecutorGroup eventExecutorGroup()
ConnectionWatchdog.int ioThreadPoolSize()
int computationThreadPoolSize()
EventBus eventBus()
EventPublisherOptions commandLatencyPublisherOptions()
EventPublisherOptions for latency event publishing.EventPublisherOptions for latency event publishingCommandLatencyCollector commandLatencyCollector()
CommandLatencyCollector.DnsResolver dnsResolver()
DnsResolver.Copyright © 2016. All rights reserved.