org.appng.api.search

## Class Consumer<E,P extends Producer<E>>

- java.lang.Object
- - org.appng.api.search.BlockingQueueAccessor<P>
  - - org.appng.api.search.Consumer<E,P>

- Type Parameters:
    `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>`
  Direct Known Subclasses:
    DocumentIndexer

      public abstract class Consumer<E,P extends Producer<E>>
      extends BlockingQueueAccessor<P>

  A `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.
  TODO MM this has nothing to do especially with searching! Design seems overloaded, use a shared single BlockingQueue for communication between consumer and producer!
  Author:
    Matthias Müller

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Consumer()`
    `protected` | `Consumer(int queueSize)`

  - ### Method Summary

    - ### Methods inherited from class org.appng.api.search.BlockingQueueAccessor

      `get, get, getBlockingQueue, getWithTimeout, put, put, putWithTimeout`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Consumer

          protected Consumer(int queueSize)

    - #### Consumer

          protected Consumer()

Copyright © 2011–2023 aiticon GmbH. All rights reserved.