public class EtcdNettyConfig
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
EtcdNettyConfig()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
EtcdNettyConfig |
clone() |
int |
getConnectTimeout()
Get the connect timeout
|
io.netty.channel.EventLoopGroup |
getEventLoopGroup()
Get the current event loop group.
|
java.lang.String |
getHostName()
Get the local host name
|
int |
getMaxFrameSize()
Get the max frame size
|
java.lang.Class<? extends io.netty.channel.socket.SocketChannel> |
getSocketChannelClass()
Get Socket channel class
|
io.netty.util.HashedWheelTimer |
getTimer()
Get timer
|
boolean |
hasHostName() |
boolean |
isManagedEventLoopGroup()
Get whether event loop group will be closed when etcd client close, true represent yes
|
boolean |
isManagedTimer()
Get managedTimer
|
EtcdNettyConfig |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
EtcdNettyConfig |
setEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
Set a custom event loop group.
|
EtcdNettyConfig |
setEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup,
boolean managed)
Set a custom event loop group.
|
EtcdNettyConfig |
setHostName(java.lang.String hostName)
Set the host name for the local machine.
|
EtcdNettyConfig |
setMaxFrameSize(int maxFrameSize)
Set the max frame size
|
EtcdNettyConfig |
setSocketChannelClass(java.lang.Class<? extends io.netty.channel.socket.SocketChannel> socketChannelClass)
Set Socket channel class.
|
EtcdNettyConfig |
setTimer(io.netty.util.HashedWheelTimer timer)
Set a custom timer use to retry failed request
|
EtcdNettyConfig |
setTimer(io.netty.util.HashedWheelTimer timer,
boolean managed)
Set a custom timer use to retry failed request
|
public int getConnectTimeout()
public EtcdNettyConfig setConnectTimeout(int connectTimeout)
connectTimeout - to setpublic EtcdNettyConfig setEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
setEventLoopGroup(EventLoopGroup, boolean)eventLoopGroup - to set.public EtcdNettyConfig setEventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup, boolean managed)
eventLoopGroup - eventLoopGroup to set.managed - whether event loop group will be closed when etcd client close, true represent yespublic io.netty.channel.EventLoopGroup getEventLoopGroup()
public boolean isManagedEventLoopGroup()
public EtcdNettyConfig setTimer(io.netty.util.HashedWheelTimer timer)
timer - custom timerpublic EtcdNettyConfig setTimer(io.netty.util.HashedWheelTimer timer, boolean managed)
timer - custom timermanaged - whether timer will be closed when etcd client close, true represent yespublic io.netty.util.HashedWheelTimer getTimer()
public boolean isManagedTimer()
public int getMaxFrameSize()
public EtcdNettyConfig setMaxFrameSize(int maxFrameSize)
maxFrameSize - to setpublic java.lang.Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass()
public EtcdNettyConfig setSocketChannelClass(java.lang.Class<? extends io.netty.channel.socket.SocketChannel> socketChannelClass)
socketChannelClass - to setpublic boolean hasHostName()
public java.lang.String getHostName()
public EtcdNettyConfig setHostName(java.lang.String hostName)
hostName - name of local hostpublic EtcdNettyConfig clone()
clone in class java.lang.Object