public abstract class TioConfig extends MapPropSupport
| 限定符和类型 | 字段和说明 |
|---|---|
static Set<TioClientConfig> |
ALL_CLIENT_GROUPCONTEXTS
本jvm中所有的TioClientConfig对象
|
static Set<TioConfig> |
ALL_GROUPCONTEXTS
本jvm中所有的TioConfig对象
|
static Set<TioServerConfig> |
ALL_SERVER_GROUPCONTEXTS
本jvm中所有的TioServerConfig对象
|
BsIds |
bsIds |
ClientNodes |
clientNodes |
CloseRunnable |
closeRunnable |
Set<ChannelContext> |
connections |
boolean |
debug |
ThreadPoolExecutor |
groupExecutor |
Groups |
groups |
GroupStat |
groupStat |
long |
heartbeatTimeout
心跳超时时间(单位: 毫秒),如果用户不希望框架层面做心跳相关工作,请把此值设为0或负数
|
String |
id |
Ids |
ids |
boolean |
isShortConnection |
boolean |
logWhenDecodeError
解码出现异常时,是否打印异常日志
|
int |
maxDecodeFailCount
解码失败多少次抛出异常
|
protected String |
name |
PacketConverter |
packetConverter |
PacketHandlerMode |
packetHandlerMode |
static int |
READ_BUFFER_SIZE
默认的接收数据的buffer size
|
SslConfig |
sslConfig |
long |
startTime
启动时间
|
boolean |
statOn |
SynThreadPoolExecutor |
tioExecutor |
Tokens |
tokens |
boolean |
useQueueDecode
是否用队列解码(系统初始化时确定该值,中途不要变更此值,否则在切换的时候可能导致消息丢失)
|
boolean |
useQueueSend
是否用队列发送
|
Users |
users |
ConcurrentMap<Integer,Packet> |
waitingResps |
| 构造器和说明 |
|---|
TioConfig() |
TioConfig(SynThreadPoolExecutor tioExecutor,
ThreadPoolExecutor groupExecutor) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
ByteOrder |
getByteOrder() |
GroupListener |
getGroupListener() |
GroupStat |
getGroupStat() |
String |
getId() |
String |
getName() |
int |
getReadBufferSize() |
abstract TioHandler |
getTioHandler()
获取TioHandler对象
|
abstract TioListener |
getTioListener()
获取TioListener对象
|
TioUuid |
getTioUuid() |
Map<Integer,Packet> |
getWaitingResps() |
int |
hashCode() |
abstract boolean |
isServer()
是服务器端还是客户端
|
boolean |
isSsl() |
boolean |
isStopped() |
void |
setByteOrder(ByteOrder byteOrder) |
void |
setGroupListener(GroupListener groupListener) |
void |
setHeartbeatTimeout(long heartbeatTimeout) |
void |
setName(String name) |
void |
setPacketHandlerMode(PacketHandlerMode packetHandlerMode) |
void |
setReadBufferSize(int readBufferSize) |
void |
setShortConnection(boolean isShortConnection) |
void |
setSslConfig(SslConfig sslConfig) |
void |
setStopped(boolean isStopped) |
void |
setTioUuid(TioUuid tioUuid) |
void |
setUseQueueDecode(boolean useQueueDecode)
是否用队列解码(系统初始化时确定该值,中途不要变更此值,否则在切换的时候可能导致消息丢失
|
void |
setUseQueueSend(boolean useQueueSend)
是否用队列发送,可以随时切换
|
clear, computeIfAbsent, containsKey, get, remove, setpublic static final int READ_BUFFER_SIZE
public static final Set<TioServerConfig> ALL_SERVER_GROUPCONTEXTS
public static final Set<TioClientConfig> ALL_CLIENT_GROUPCONTEXTS
public final String id
public boolean isShortConnection
public SslConfig sslConfig
public boolean debug
public GroupStat groupStat
public boolean statOn
public PacketConverter packetConverter
public long startTime
public boolean useQueueSend
public boolean useQueueDecode
public long heartbeatTimeout
public boolean logWhenDecodeError
public PacketHandlerMode packetHandlerMode
public SynThreadPoolExecutor tioExecutor
public CloseRunnable closeRunnable
public ThreadPoolExecutor groupExecutor
public ClientNodes clientNodes
public Set<ChannelContext> connections
public Groups groups
public Users users
public Tokens tokens
public Ids ids
public BsIds bsIds
public int maxDecodeFailCount
public ConcurrentMap<Integer,Packet> waitingResps
protected String name
public TioConfig()
public TioConfig(SynThreadPoolExecutor tioExecutor, ThreadPoolExecutor groupExecutor)
tioExecutor - groupExecutor - public abstract TioHandler getTioHandler()
public abstract TioListener getTioListener()
public ByteOrder getByteOrder()
public void setByteOrder(ByteOrder byteOrder)
byteOrder - public GroupListener getGroupListener()
public void setGroupListener(GroupListener groupListener)
groupListener - the groupListener to setpublic String getId()
public String getName()
public void setName(String name)
public TioUuid getTioUuid()
public void setTioUuid(TioUuid tioUuid)
tioUuid - the tioUuid to setpublic boolean isStopped()
public void setStopped(boolean isStopped)
isStopped - the isStop to setpublic void setHeartbeatTimeout(long heartbeatTimeout)
heartbeatTimeout - the heartbeatTimeout to setpublic void setPacketHandlerMode(PacketHandlerMode packetHandlerMode)
packetHandlerMode - the packetHandlerMode to setpublic void setShortConnection(boolean isShortConnection)
isShortConnection - the isShortConnection to setpublic void setSslConfig(SslConfig sslConfig)
public GroupStat getGroupStat()
public void setUseQueueDecode(boolean useQueueDecode)
useQueueDecode - public void setUseQueueSend(boolean useQueueSend)
useQueueSend - public abstract boolean isServer()
public int getReadBufferSize()
public void setReadBufferSize(int readBufferSize)
readBufferSize - the readBufferSize to setpublic boolean isSsl()
Copyright © 2023. All rights reserved.