public class MemoryLimitedLinkedBlockingQueue<E> extends LinkedBlockingQueue<E>
LinkedBlockingQueue.| Constructor and Description |
|---|
MemoryLimitedLinkedBlockingQueue(Collection<? extends E> c,
long memoryLimit,
Instrumentation inst) |
MemoryLimitedLinkedBlockingQueue(Instrumentation inst) |
MemoryLimitedLinkedBlockingQueue(long memoryLimit,
Instrumentation inst) |
| Modifier and Type | Method and Description |
|---|---|
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, retainAllequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddaddAll, 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 in interface BlockingQueue<E>put in class LinkedBlockingQueue<E>InterruptedExceptionpublic boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BlockingQueue<E>offer in class LinkedBlockingQueue<E>InterruptedExceptionpublic boolean offer(E e)
offer in interface BlockingQueue<E>offer in interface Queue<E>offer in class LinkedBlockingQueue<E>public E take() throws InterruptedException
take in interface BlockingQueue<E>take in class LinkedBlockingQueue<E>InterruptedExceptionpublic E poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<E>poll in class LinkedBlockingQueue<E>InterruptedExceptionpublic E poll()
public boolean remove(Object o)
remove in interface Collection<E>remove in interface BlockingQueue<E>remove in class LinkedBlockingQueue<E>public void clear()
clear in interface Collection<E>clear in class LinkedBlockingQueue<E>Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.