public final class MonitorPlugin extends AbstractPlugin implements Runnable
| 限定符和类型 | 字段和说明 |
|---|---|
private LongAdder |
disConnect
当前周期内断开连接数
|
private LongAdder |
inFlow
当前周期内流入字节数
|
private static org.slf4j.Logger |
LOGGER |
private LongAdder |
newConnect
当前周期内新建连接数
|
private long |
onlineCount
当前在线状态连接数
|
private LongAdder |
outFlow
当前周期内流出字节数
|
private LongAdder |
processFailNum
当前周期内处理失败消息数
|
private LongAdder |
processMsgNum
当前周期内处理消息数
|
private LongAdder |
readCount
当前周期内执行 read 操作次数
|
private int |
seconds
任务执行频率
|
private long |
totalConnect
自插件启用起的累计连接总数
|
private long |
totalProcessMsgNum
自插件启用起的累计处理消息总数
|
private LongAdder |
writeCount
当前周期内执行 write 操作次数
|
| 构造器和说明 |
|---|
MonitorPlugin() |
MonitorPlugin(int seconds) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterRead(ChannelContext channelContext,
int readSize) |
void |
afterWrite(ChannelContext channelContext,
int writeSize) |
boolean |
beforeProcess(ChannelContext channelContext,
Packet packet) |
void |
beforeRead(ChannelContext channelContext) |
void |
beforeWrite(ChannelContext channelContext) |
private long |
getAndReset(LongAdder longAdder) |
void |
run() |
void |
stateEvent(StateMachineEnum stateMachineEnum,
ChannelContext channelContext,
Throwable throwable) |
afterDecode, beforeEncode, shouldAcceptprivate static final org.slf4j.Logger LOGGER
private final LongAdder inFlow
private final LongAdder outFlow
private final LongAdder processFailNum
private final LongAdder processMsgNum
private final LongAdder newConnect
private final LongAdder disConnect
private final LongAdder readCount
private final LongAdder writeCount
private final int seconds
private long totalConnect
private long totalProcessMsgNum
private long onlineCount
public boolean beforeProcess(ChannelContext channelContext, Packet packet)
beforeProcess 在接口中 PluginbeforeProcess 在类中 AbstractPluginpublic void stateEvent(StateMachineEnum stateMachineEnum, ChannelContext channelContext, Throwable throwable)
stateEvent 在接口中 PluginstateEvent 在类中 AbstractPluginprivate long getAndReset(LongAdder longAdder)
public void afterRead(ChannelContext channelContext, int readSize)
afterRead 在接口中 MonitorafterRead 在类中 AbstractPluginpublic void beforeRead(ChannelContext channelContext)
beforeRead 在接口中 MonitorbeforeRead 在类中 AbstractPluginpublic void afterWrite(ChannelContext channelContext, int writeSize)
afterWrite 在接口中 MonitorafterWrite 在类中 AbstractPluginpublic void beforeWrite(ChannelContext channelContext)
beforeWrite 在接口中 MonitorbeforeWrite 在类中 AbstractPluginCopyright © 2023. All rights reserved.