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

字段摘要
 
从类 net.neoremind.fountain.common.mq.AbstractMaxCapacityFountainMQ 继承的字段
limitSize
 
构造方法摘要
MemFountainMQ(int limit)
           
 
方法摘要
protected  int getRequiredPermits(BinlogTraceable e)
          从一个数据消息中获取需要权限的个数
 boolean isExceedMaxCapacity(int len)
          是否超过队列的最大容量
 
从类 net.neoremind.fountain.common.mq.AbstractMaxCapacityFountainMQ 继承的方法
pop, pop, push, push
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 net.neoremind.fountain.common.mq.FountainMQ 继承的方法
pop, pop, push, push
 

构造方法详细信息

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.