E
- the type consumed by this Consumer
(and produced by a Producer
via BlockingQueueAccessor.put(Object)
,
BlockingQueueAccessor.put(Object, long)
or BlockingQueueAccessor.putWithTimeout(Object, long)
)P
- the type of the Producer
which must produce object of type <E>
public abstract class Consumer<E,P extends Producer<E>> extends BlockingQueueAccessor<P>
Consumer
is aware of several Producer
s which can be added via the BlockingQueueAccessor.put(Object)
,
BlockingQueueAccessor.put(Object, long)
and BlockingQueueAccessor.putWithTimeout(Object, long)
method. It can access it's queued
Producer
s with the corresponding BlockingQueueAccessor.get()
, BlockingQueueAccessor.get(long)
and BlockingQueueAccessor.getBlockingQueue()
method.Modifier | Constructor and Description |
---|---|
protected |
Consumer() |
protected |
Consumer(int queueSize) |
get, get, getBlockingQueue, getWithTimeout, put, put, putWithTimeout
Copyright © 2011–2023 aiticon GmbH. All rights reserved.