类 MemoryLimitedLinkedBlockingQueue<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- java.util.concurrent.LinkedBlockingQueue<E>
-
- org.apache.dubbo.common.threadpool.MemoryLimitedLinkedBlockingQueue<E>
-
- 所有已实现的接口:
Serializable,Iterable<E>,Collection<E>,BlockingQueue<E>,Queue<E>
public class MemoryLimitedLinkedBlockingQueue<E> extends LinkedBlockingQueue<E>
Can completely solve the OOM problem caused byLinkedBlockingQueue.- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 MemoryLimitedLinkedBlockingQueue(long memoryLimit, Instrumentation inst)MemoryLimitedLinkedBlockingQueue(Instrumentation inst)MemoryLimitedLinkedBlockingQueue(Collection<? extends E> c, long memoryLimit, Instrumentation inst)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclear()longgetCurrentMemory()longgetCurrentRemainMemory()longgetMemoryLimit()booleanoffer(E e)booleanoffer(E e, long timeout, TimeUnit unit)Epoll()Epoll(long timeout, TimeUnit unit)voidput(E e)booleanremove(Object o)voidsetMemoryLimit(long memoryLimit)Etake()-
从类继承的方法 java.util.concurrent.LinkedBlockingQueue
contains, drainTo, drainTo, forEach, iterator, peek, remainingCapacity, removeAll, removeIf, retainAll, size, spliterator, toArray, toArray, toString
-
从类继承的方法 java.util.AbstractQueue
add, addAll, element, remove
-
从类继承的方法 java.util.AbstractCollection
containsAll, isEmpty
-
从接口继承的方法 java.util.concurrent.BlockingQueue
add
-
从接口继承的方法 java.util.Collection
addAll, containsAll, equals, hashCode, isEmpty, parallelStream, stream, toArray
-
-
-
-
构造器详细资料
-
MemoryLimitedLinkedBlockingQueue
public MemoryLimitedLinkedBlockingQueue(Instrumentation inst)
-
MemoryLimitedLinkedBlockingQueue
public MemoryLimitedLinkedBlockingQueue(long memoryLimit, Instrumentation inst)
-
MemoryLimitedLinkedBlockingQueue
public MemoryLimitedLinkedBlockingQueue(Collection<? extends E> c, long memoryLimit, Instrumentation inst)
-
-
方法详细资料
-
setMemoryLimit
public void setMemoryLimit(long memoryLimit)
-
getMemoryLimit
public long getMemoryLimit()
-
getCurrentMemory
public long getCurrentMemory()
-
getCurrentRemainMemory
public long getCurrentRemainMemory()
-
put
public void put(E e) throws InterruptedException
- 指定者:
put在接口中BlockingQueue<E>- 覆盖:
put在类中LinkedBlockingQueue<E>- 抛出:
InterruptedException
-
offer
public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
- 指定者:
offer在接口中BlockingQueue<E>- 覆盖:
offer在类中LinkedBlockingQueue<E>- 抛出:
InterruptedException
-
offer
public boolean offer(E e)
- 指定者:
offer在接口中BlockingQueue<E>- 指定者:
offer在接口中Queue<E>- 覆盖:
offer在类中LinkedBlockingQueue<E>
-
take
public E take() throws InterruptedException
- 指定者:
take在接口中BlockingQueue<E>- 覆盖:
take在类中LinkedBlockingQueue<E>- 抛出:
InterruptedException
-
poll
public E poll(long timeout, TimeUnit unit) throws InterruptedException
- 指定者:
poll在接口中BlockingQueue<E>- 覆盖:
poll在类中LinkedBlockingQueue<E>- 抛出:
InterruptedException
-
remove
public boolean remove(Object o)
- 指定者:
remove在接口中BlockingQueue<E>- 指定者:
remove在接口中Collection<E>- 覆盖:
remove在类中LinkedBlockingQueue<E>
-
clear
public void clear()
- 指定者:
clear在接口中Collection<E>- 覆盖:
clear在类中LinkedBlockingQueue<E>
-
-