@Deprecated public class MagicQueue<T> extends Object implements BlockingQueue<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
MagicQueue.Builder
Deprecated.
|
static class |
MagicQueue.Mode
Deprecated.
|
static class |
MagicQueue.Type
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<LinkedBlockingQueue<T>> |
backingQueues
Deprecated.
|
protected int |
capacity
Deprecated.
|
protected AtomicLong |
cntGet
Deprecated.
|
protected AtomicLong |
cntPut
Deprecated.
|
protected List<org.deeplearning4j.parallelism.MagicQueue.QueueHandler> |
handlers
Deprecated.
|
protected AtomicInteger |
interleavedCounter
Deprecated.
|
protected AtomicInteger |
interleavedPutter
Deprecated.
|
protected MagicQueue.Mode |
mode
Deprecated.
|
protected AtomicInteger |
nextBucket
Deprecated.
|
protected int |
numberOfBuckets
Deprecated.
|
protected MagicQueue.Type |
type
Deprecated.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MagicQueue(int numberOfFlows,
int capacity,
MagicQueue.Type type)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T dataSet)
Deprecated.
|
boolean |
addAll(Collection<? extends T> c)
Deprecated.
|
void |
clear()
Deprecated.
|
boolean |
contains(Object o)
Deprecated.
This method isn't supported
|
boolean |
containsAll(Collection<?> c)
Deprecated.
This method isn't supported
|
int |
drainTo(Collection<? super T> c)
Deprecated.
|
int |
drainTo(Collection<? super T> c,
int maxElements)
Deprecated.
|
T |
element()
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
Iterator<T> |
iterator()
Deprecated.
This method isn't supported
|
boolean |
offer(T dataSet)
Deprecated.
|
boolean |
offer(T dataSet,
long timeout,
TimeUnit unit)
Deprecated.
|
T |
peek()
Deprecated.
|
T |
poll()
Deprecated.
This method is supposed to be called from managed thread, attached to specific device.
|
T |
poll(long time,
TimeUnit timeUnit)
Deprecated.
This method is supposed to be called from managed thread, attached to specific device.
|
void |
put(T dataSet)
Deprecated.
|
int |
remainingCapacity()
Deprecated.
|
T |
remove()
Deprecated.
|
boolean |
remove(Object o)
Deprecated.
This method isn't supported
|
boolean |
removeAll(Collection<?> c)
Deprecated.
This method isn't supported
|
boolean |
retainAll(Collection<?> c)
Deprecated.
This method isn't supported
|
int |
size()
Deprecated.
This method returns average queue size for all devices
|
protected int |
size(int deviceId)
Deprecated.
|
T |
take()
Deprecated.
|
Object[] |
toArray()
Deprecated.
This method isn't supported
|
<T> T[] |
toArray(T[] a)
Deprecated.
This method isn't supported
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streamprotected final List<LinkedBlockingQueue<T>> backingQueues
protected final AtomicInteger nextBucket
protected final int numberOfBuckets
protected final List<org.deeplearning4j.parallelism.MagicQueue.QueueHandler> handlers
protected int capacity
protected MagicQueue.Mode mode
protected MagicQueue.Type type
protected AtomicInteger interleavedCounter
protected AtomicInteger interleavedPutter
protected AtomicLong cntPut
protected AtomicLong cntGet
protected MagicQueue(int numberOfFlows,
int capacity,
MagicQueue.Type type)
public int size()
size in interface Collection<T>protected int size(int deviceId)
public boolean isEmpty()
isEmpty in interface Collection<T>public boolean contains(Object o)
contains in interface Collection<T>contains in interface BlockingQueue<T>o - public int drainTo(Collection<? super T> c)
drainTo in interface BlockingQueue<T>public int drainTo(Collection<? super T> c, int maxElements)
drainTo in interface BlockingQueue<T>public Object[] toArray()
toArray in interface Collection<T>public <T> T[] toArray(T[] a)
toArray in interface Collection<T>T - a - public boolean add(T dataSet)
add in interface Collection<T>add in interface BlockingQueue<T>add in interface Queue<T>public boolean remove(Object o)
remove in interface Collection<T>remove in interface BlockingQueue<T>o - public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>c - public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>c - public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>c - public void clear()
clear in interface Collection<T>public boolean offer(T dataSet)
public void put(T dataSet) throws InterruptedException
put in interface BlockingQueue<T>InterruptedExceptionpublic boolean offer(T dataSet, long timeout, TimeUnit unit) throws InterruptedException
offer in interface BlockingQueue<T>InterruptedExceptionpublic T take() throws InterruptedException
take in interface BlockingQueue<T>InterruptedExceptionpublic T poll(long time, TimeUnit timeUnit) throws InterruptedException
poll in interface BlockingQueue<T>time - time to wait for something appear in queuetimeUnit - TimeUnit for time paramInterruptedExceptionpublic int remainingCapacity()
remainingCapacity in interface BlockingQueue<T>public T poll()
Copyright © 2017. All rights reserved.