抽象监控上报消息实体.

pull/28/head
chen.ma 3 years ago
parent 5f75eb5f3c
commit 8d38bd8176

@ -0,0 +1,31 @@
package cn.hippo4j.common.monitor;
import lombok.Data;
import java.util.List;
/**
* Base message.
*
* @author chen.ma
* @date 2021/12/7 20:31
*/
@Data
public abstract class AbstractMessage implements Message {
/**
* groupKey: tenant + item + tpId + identify
*/
private String groupKey;
/**
* messageTypeEnum
*/
private MessageTypeEnum messageTypeEnum;
/**
* message
*/
private List<Message> messages;
}

@ -0,0 +1,18 @@
package cn.hippo4j.common.monitor;
/**
* Abstract message monitoring interface.
*
* @author chen.ma
* @date 2021/12/6 20:16
*/
public interface Message {
/**
* Get groupKey.
*
* @return
*/
String getGroupKey();
}

@ -0,0 +1,16 @@
package cn.hippo4j.common.monitor;
/**
* Message type enum.
*
* @author chen.ma
* @date 2021/12/7 19:34
*/
public enum MessageTypeEnum {
/**
*
*/
RUNTIME
}

@ -0,0 +1,54 @@
package cn.hippo4j.common.monitor;
import lombok.Data;
/**
* Dynamic thread pool runtime data.
*
* @author chen.ma
* @date 2021/12/6 18:18
*/
@Data
public class RuntimeMessage extends AbstractMessage {
/**
* currentLoad
*/
private String currentLoad;
/**
* peakLoad
*/
private String peakLoad;
/**
* poolSize
*/
private Integer poolSize;
/**
* The maximum number of threads that enter the thread pool at the same time
*/
private Integer largestPoolSize;
/**
* queueCapacity
*/
private Integer queueCapacity;
/**
* queueSize
*/
private Integer queueSize;
/**
* completedTaskCount
*/
private Long completedTaskCount;
/**
* rejectCount
*/
private Integer rejectCount;
}
Loading…
Cancel
Save