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 EventLoopGroups
EventExecutorGroup
for performing internal computation tasksModifier 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()
Return s the
EventLoopGroupProvider which provides access to the particular
event loop groups . lettuce needs 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.
|
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 timeout
EventLoopGroupProvider eventLoopGroupProvider()
EventLoopGroupProvider
which provides access to the particular
event loop groups
. lettuce needs at least two implementations:
NioEventLoopGroup
for TCP/IP connections and
EpollEventLoopGroup
for unix domain socket connections (epoll).EventLoopGroupProvider
which provides access to the particular
event loop groups
EventExecutorGroup eventExecutorGroup()
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.