public abstract class ConfigBase<T extends Config> extends Object implements Config
| 限定符和类型 | 字段和说明 |
|---|---|
protected Charset |
charset |
protected int |
codecThreads |
protected int |
exchangeThreads |
protected long |
idleTimeout |
protected int |
ioThreads |
protected int |
maxUdpSize |
protected int |
readBufferSize |
protected long |
requestTimeout |
protected long |
streamTimeout |
protected int |
writeBufferSize |
| 构造器和说明 |
|---|
ConfigBase(boolean clientMode) |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
charset(Charset charset)
配置字符集
|
boolean |
clientMode()
是否客户端模式
|
T |
codecThreads(int codecThreads)
配置解码线程数
|
T |
exchangeExecutor(ExecutorService exchangeExecutor)
配置交换执行器
|
T |
exchangeThreads(int exchangeThreads)
配置交换线程数
|
T |
fragmentHandler(FragmentHandler fragmentHandler)
配置分片处理
|
T |
fragmentSize(int fragmentSize)
配置分片大小
|
String |
genId()
生成Id
|
Charset |
getCharset()
获取字符集
|
Codec |
getCodec()
获取编解码器
|
int |
getCodecThreads()
获取解码线程数
|
ExecutorService |
getExchangeExecutor()
获取交换执行器
|
int |
getExchangeThreads()
获取交换线程数
|
FragmentHandler |
getFragmentHandler()
获取分片处理
|
int |
getFragmentSize()
获取分片大小
|
long |
getIdleTimeout()
获取连接空闲超时
|
int |
getIoThreads()
Io线程数
|
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 |
ioThreads(int ioThreads)
Io线程数
|
boolean |
isNolockSend()
无锁发送
|
boolean |
isSerialSend()
串行发送
|
T |
maxUdpSize(int maxUdpSize)
配置允许最大UDP包大小
|
T |
nolockSend(boolean nolockSend)
配置无锁发送
|
T |
readBufferSize(int readBufferSize)
配置读缓冲大小
|
T |
requestTimeout(long requestTimeout)
配置请求默认超时
|
T |
serialSend(boolean serialSend)
配置串行发送
|
T |
sslContext(SSLContext sslContext)
配置 ssl 上下文
|
T |
streamTimeout(long streamTimeout)
配置消息流超时(单位:毫秒)
|
T |
writeBufferSize(int writeBufferSize)
配置写缓冲大小
|
protected Charset charset
protected int ioThreads
protected int codecThreads
protected int exchangeThreads
protected int readBufferSize
protected int writeBufferSize
protected long idleTimeout
protected long requestTimeout
protected long streamTimeout
protected int maxUdpSize
public boolean clientMode()
clientMode 在接口中 Configpublic boolean isSerialSend()
isSerialSend 在接口中 Configpublic T serialSend(boolean serialSend)
public boolean isNolockSend()
isNolockSend 在接口中 Configpublic T nolockSend(boolean nolockSend)
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 T idGenerator(IdGenerator idGenerator)
public SSLContext getSslContext()
getSslContext 在接口中 Configpublic T sslContext(SSLContext sslContext)
public ExecutorService getExchangeExecutor()
getExchangeExecutor 在接口中 Configpublic T exchangeExecutor(ExecutorService exchangeExecutor)
public int getIoThreads()
getIoThreads 在接口中 Configpublic T ioThreads(int ioThreads)
public int getCodecThreads()
getCodecThreads 在接口中 Configpublic T codecThreads(int codecThreads)
public int getExchangeThreads()
getExchangeThreads 在接口中 Configpublic T exchangeThreads(int exchangeThreads)
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.