public static class SocketOptions.KeepAliveOptions.Builder extends Object
SocketOptions.KeepAliveOptions.| Modifier and Type | Method and Description |
|---|---|
SocketOptions.KeepAliveOptions |
build()
Create a new instance of
SocketOptions.KeepAliveOptions |
SocketOptions.KeepAliveOptions.Builder |
count(int count)
Set the the maximum number of keepalive probes TCP should send before dropping the connection.
|
SocketOptions.KeepAliveOptions.Builder |
disable()
Disable TCP keepalive.
|
SocketOptions.KeepAliveOptions.Builder |
enable()
Enable TCP keepalive.
|
SocketOptions.KeepAliveOptions.Builder |
enable(boolean enabled)
Enable TCP keepalive.
|
SocketOptions.KeepAliveOptions.Builder |
idle(Duration idle)
The time the connection needs to remain idle before TCP starts sending keepalive probes if keepalive is enabled.
|
SocketOptions.KeepAliveOptions.Builder |
interval(Duration interval)
The time between individual keepalive probes.
|
public SocketOptions.KeepAliveOptions.Builder count(int count)
9. See also SocketOptions.KeepAliveOptions.DEFAULT_COUNT and TCP_KEEPCNT.count - the maximum number of keepalive probes TCPthispublic SocketOptions.KeepAliveOptions.Builder enable()
SocketOptions.DEFAULT_SO_KEEPALIVE.thisSocketOptions.SO_KEEPALIVEpublic SocketOptions.KeepAliveOptions.Builder disable()
SocketOptions.DEFAULT_SO_KEEPALIVE.thisSocketOptions.SO_KEEPALIVEpublic SocketOptions.KeepAliveOptions.Builder enable(boolean enabled)
false. See SocketOptions.DEFAULT_SO_KEEPALIVE.enabled - whether to enable TCP keepalive.thisSocketOptions.SO_KEEPALIVEpublic SocketOptions.KeepAliveOptions.Builder idle(Duration idle)
2 hours. See also @link SocketOptions.KeepAliveOptions.DEFAULT_IDLE and TCP_KEEPIDLE.
The time granularity of is seconds.
idle - connection idle time, must be greater 0.thispublic SocketOptions.KeepAliveOptions.Builder interval(Duration interval)
75 second. See also SocketOptions.KeepAliveOptions.DEFAULT_INTERVAL
and TCP_KEEPINTVL.
The time granularity of is seconds.
interval - connection interval time, must be greater 0thispublic SocketOptions.KeepAliveOptions build()
SocketOptions.KeepAliveOptionsSocketOptions.KeepAliveOptionsCopyright © 2022 lettuce.io. All rights reserved.