public abstract class ConfigBase<T extends Config> extends Object implements Config
| 限定符和类型 | 字段和说明 |
|---|---|
protected Charset |
charset |
protected int |
coreThreads |
protected long |
idleTimeout |
protected int |
maxThreads |
protected int |
maxUdpSize |
protected int |
readBufferSize |
protected long |
requestTimeout |
protected long |
streamTimeout |
protected int |
writeBufferSize |
| 构造器和说明 |
|---|
ConfigBase(boolean clientMode) |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
channelExecutor(ExecutorService channelExecutor)
配置调试执行器
|
T |
charset(Charset charset)
配置字符集
|
boolean |
clientMode()
是否客户端模式
|
T |
coreThreads(int coreThreads)
配置核心线程数
|
T |
fragmentHandler(FragmentHandler fragmentHandler)
配置分片处理
|
T |
fragmentSize(int fragmentSize)
配置分片大小
|
ExecutorService |
getChannelExecutor()
通道执行器
|
Charset |
getCharset()
获取字符集
|
Codec |
getCodec()
获取编解码器
|
int |
getCoreThreads()
获取核心线程数
|
FragmentHandler |
getFragmentHandler()
获取分片处理
|
int |
getFragmentSize()
获取分片大小
|
IdGenerator |
getIdGenerator()
获取标识生成器
|
long |
getIdleTimeout()
获取连接空闲超时
|
int |
getMaxThreads()
获取最大线程数
|
int |
getMaxUdpSize()
获取允许最大UDP包大小
|
int |
getReadBufferSize()
获取读缓冲大小
|
long |
getRequestTimeout()
获取请求默认超时
|
String |
getRoleName()
获取角色名
|
SSLContext |
getSslContext()
获取 ssl 上下文
|
StreamManger |
getStreamManger()
获取流管理器
|
long |
getStreamTimeout()
获取消息流超时(单位:毫秒)
|
int |
getWriteBufferSize()
获取写缓冲大小
|
T |
idGenerator(IdGenerator idGenerator)
配置标识生成器
|
T |
idleTimeout(int idleTimeout)
配置连接空闲超时
|
T |
maxThreads(int maxThreads)
配置最大线程数
|
T |
maxUdpSize(int maxUdpSize)
配置允许最大UDP包大小
|
T |
readBufferSize(int readBufferSize)
配置读缓冲大小
|
T |
requestTimeout(long requestTimeout)
配置请求默认超时
|
boolean |
sequenceMode()
顺序模式
|
T |
sequenceMode(boolean sequenceMode)
配置顺序模式
|
T |
sslContext(SSLContext sslContext)
配置 ssl 上下文
|
T |
streamTimeout(long streamTimeout)
配置消息流超时(单位:毫秒)
|
T |
writeBufferSize(int writeBufferSize)
配置写缓冲大小
|
protected Charset charset
protected int coreThreads
protected int maxThreads
protected int readBufferSize
protected int writeBufferSize
protected long idleTimeout
protected long requestTimeout
protected long streamTimeout
protected int maxUdpSize
public boolean clientMode()
clientMode 在接口中 Configpublic boolean sequenceMode()
sequenceMode 在接口中 Configpublic T sequenceMode(boolean sequenceMode)
public StreamManger getStreamManger()
getStreamManger 在接口中 Configpublic String getRoleName()
getRoleName 在接口中 Configpublic Charset getCharset()
getCharset 在接口中 Configpublic FragmentHandler getFragmentHandler()
getFragmentHandler 在接口中 Configpublic T fragmentHandler(FragmentHandler fragmentHandler)
public int getFragmentSize()
getFragmentSize 在接口中 Configpublic T fragmentSize(int fragmentSize)
public IdGenerator getIdGenerator()
getIdGenerator 在接口中 Configpublic T idGenerator(IdGenerator idGenerator)
public SSLContext getSslContext()
getSslContext 在接口中 Configpublic T sslContext(SSLContext sslContext)
public ExecutorService getChannelExecutor()
ConfiggetChannelExecutor 在接口中 Configpublic T channelExecutor(ExecutorService channelExecutor)
public int getCoreThreads()
getCoreThreads 在接口中 Configpublic T coreThreads(int coreThreads)
public int getMaxThreads()
getMaxThreads 在接口中 Configpublic T maxThreads(int maxThreads)
public int getReadBufferSize()
getReadBufferSize 在接口中 Configpublic T readBufferSize(int readBufferSize)
public int getWriteBufferSize()
getWriteBufferSize 在接口中 Configpublic T writeBufferSize(int writeBufferSize)
public long getIdleTimeout()
getIdleTimeout 在接口中 Configpublic T idleTimeout(int idleTimeout)
public long getRequestTimeout()
getRequestTimeout 在接口中 Configpublic T requestTimeout(long requestTimeout)
public long getStreamTimeout()
getStreamTimeout 在接口中 Configpublic T streamTimeout(long streamTimeout)
public int getMaxUdpSize()
getMaxUdpSize 在接口中 Configpublic T maxUdpSize(int maxUdpSize)
Copyright © 2024. All rights reserved.