net.neoremind.fountain.common.mq
类 MemFountainMQ
java.lang.Object
net.neoremind.fountain.common.mq.AbstractMaxCapacityFountainMQ
net.neoremind.fountain.common.mq.MemFountainMQ
- 所有已实现的接口:
- FountainMQ
public class MemFountainMQ
- extends AbstractMaxCapacityFountainMQ
- implements FountainMQ
FountainMQ缺省实现,每个放入队列的对象
占用队列容量数为1
封装BlockingQueue,必须有界,这是为了防止内存oom
- 作者:
- hexiufeng
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemFountainMQ
public MemFountainMQ(int limit)
isExceedMaxCapacity
public boolean isExceedMaxCapacity(int len)
- 从接口
FountainMQ 复制的描述
- 是否超过队列的最大容量
- 指定者:
- 接口
FountainMQ 中的 isExceedMaxCapacity
- 参数:
len - 长度
- 返回:
- 是否超出
getRequiredPermits
protected int getRequiredPermits(BinlogTraceable e)
- 从类
AbstractMaxCapacityFountainMQ 复制的描述
- 从一个数据消息中获取需要权限的个数
- 指定者:
- 类
AbstractMaxCapacityFountainMQ 中的 getRequiredPermits
- 参数:
e - 消息
- 返回:
- 权限个数
Copyright © 2016 neoremind. All rights reserved.