public static class IoEnvironment.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
IoEnvironment.Builder |
analyticsEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Allows to specify a custom event loop group (I/O event loop thread pool) for the analytics service.
|
IoEnvironment |
build() |
IoEnvironment.Builder |
enableNativeIo(boolean nativeIoEnabled)
If set to false (enabled by default) will force using the java NIO based IO transport.
|
IoEnvironment.Builder |
eventLoopThreadCount(int eventLoopThreadCount)
Overrides the number of threads used per event loop.
|
IoEnvironment.Builder |
kvEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Allows to specify a custom event loop group (I/O event loop thread pool) for the management service.
|
IoEnvironment.Builder |
managerEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Allows to specify a custom event loop group (I/O event loop thread pool) for the management service.
|
IoEnvironment.Builder |
queryEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Allows to specify a custom event loop group (I/O event loop thread pool) for the query service.
|
IoEnvironment.Builder |
searchEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Allows to specify a custom event loop group (I/O event loop thread pool) for the search service.
|
IoEnvironment.Builder |
viewEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Allows to specify a custom event loop group (I/O event loop thread pool) for the view service.
|
public IoEnvironment.Builder managerEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Note that you usually do not need to tweak the event loop for the manager service, only if you perform long-running management queries that interfere with regular traffic.
Note: tweaking the dedicated event loops should be done with care and only after profiling
indicated that the default event loop setup is not achieving the desired performance characteristics. Please
see the javadoc for the IoEnvironment
class for an explanation how the event loops play together for
all the services and what effect a custom pool might have.
eventLoopGroup
- the dedicated event loop group to use.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder kvEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Note: tweaking the dedicated event loops should be done with care and only after profiling
indicated that the default event loop setup is not achieving the desired performance characteristics. Please
see the javadoc for the IoEnvironment
class for an explanation how the event loops play together for
all the services and what effect a custom pool might have.
eventLoopGroup
- the dedicated event loop group to use.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder queryEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Note: tweaking the dedicated event loops should be done with care and only after profiling
indicated that the default event loop setup is not achieving the desired performance characteristics. Please
see the javadoc for the IoEnvironment
class for an explanation how the event loops play together for
all the services and what effect a custom pool might have.
eventLoopGroup
- the dedicated event loop group to use.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder analyticsEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Note: tweaking the dedicated event loops should be done with care and only after profiling
indicated that the default event loop setup is not achieving the desired performance characteristics. Please
see the javadoc for the IoEnvironment
class for an explanation how the event loops play together for
all the services and what effect a custom pool might have.
eventLoopGroup
- the dedicated event loop group to use.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder searchEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Note: tweaking the dedicated event loops should be done with care and only after profiling
indicated that the default event loop setup is not achieving the desired performance characteristics. Please
see the javadoc for the IoEnvironment
class for an explanation how the event loops play together for
all the services and what effect a custom pool might have.
eventLoopGroup
- the dedicated event loop group to use.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder viewEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.EventLoopGroup eventLoopGroup)
Note: tweaking the dedicated event loops should be done with care and only after profiling
indicated that the default event loop setup is not achieving the desired performance characteristics. Please
see the javadoc for the IoEnvironment
class for an explanation how the event loops play together for
all the services and what effect a custom pool might have.
eventLoopGroup
- the dedicated event loop group to use.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder enableNativeIo(boolean nativeIoEnabled)
Usually the native transports used (epoll on linux and kqueue on OSX) are going to be faster and more efficient than the generic NIO one. We recommend to only set this to false if you experience issues with the native transports or instructed by couchbase support to do so for troubleshooting reasons.
nativeIoEnabled
- if native IO should be enabled or disabled.IoEnvironment.Builder
for chaining purposes.public IoEnvironment.Builder eventLoopThreadCount(int eventLoopThreadCount)
If not manually overridden, a fair thread count is calculated, see IoEnvironment.fairThreadCount()
for more
information on the heuristics.
Note that the count provided will only be used by event loops that the SDK creates. If you configure a custom
event loop (i.e. through kvEventLoopGroup(EventLoopGroup)
) you are responsible for sizing it
appropriately on your own.
eventLoopThreadCount
- the number of event loops to use per pool.IoEnvironment.Builder
for chaining purposes.@Stability.Internal public IoEnvironment build()
Copyright © 2021 Couchbase, Inc.. All rights reserved.