public class MemoryLimitedLinkedBlockingQueue<E> extends LinkedBlockingQueue<E>
LinkedBlockingQueue.| 构造器和说明 |
|---|
MemoryLimitedLinkedBlockingQueue(Collection<? extends E> c,
long memoryLimit,
Instrumentation inst) |
MemoryLimitedLinkedBlockingQueue(Instrumentation inst) |
MemoryLimitedLinkedBlockingQueue(long memoryLimit,
Instrumentation inst) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
long |
getCurrentMemory() |
long |
getCurrentRemainMemory() |
long |
getMemoryLimit() |
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
TimeUnit unit) |
E |
poll() |
E |
poll(long timeout,
TimeUnit unit) |
void |
put(E e) |
boolean |
remove(Object o) |
void |
setMemoryLimit(long memoryLimit) |
E |
take() |
contains, drainTo, drainTo, iterator, peek, remainingCapacity, size, spliterator, toArray, toArray, toStringadd, addAll, element, removecontainsAll, isEmpty, removeAll, retainAlladdaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, streampublic MemoryLimitedLinkedBlockingQueue(Instrumentation inst)
public MemoryLimitedLinkedBlockingQueue(long memoryLimit,
Instrumentation inst)
public MemoryLimitedLinkedBlockingQueue(Collection<? extends E> c, long memoryLimit, Instrumentation inst)
public void setMemoryLimit(long memoryLimit)
public long getMemoryLimit()
public long getCurrentMemory()
public long getCurrentRemainMemory()
public void put(E e) throws InterruptedException
put 在接口中 BlockingQueue<E>put 在类中 LinkedBlockingQueue<E>InterruptedExceptionpublic boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
offer 在接口中 BlockingQueue<E>offer 在类中 LinkedBlockingQueue<E>InterruptedExceptionpublic boolean offer(E e)
offer 在接口中 BlockingQueue<E>offer 在接口中 Queue<E>offer 在类中 LinkedBlockingQueue<E>public E take() throws InterruptedException
take 在接口中 BlockingQueue<E>take 在类中 LinkedBlockingQueue<E>InterruptedExceptionpublic E poll(long timeout, TimeUnit unit) throws InterruptedException
poll 在接口中 BlockingQueue<E>poll 在类中 LinkedBlockingQueue<E>InterruptedExceptionpublic boolean remove(Object o)
remove 在接口中 Collection<E>remove 在接口中 BlockingQueue<E>remove 在类中 LinkedBlockingQueue<E>public void clear()
clear 在接口中 Collection<E>clear 在类中 LinkedBlockingQueue<E>Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.