Class Consumer<T>

java.lang.Object
com.semedy.reasoner.utils.Consumer<T>

public abstract class Consumer<T> extends Object
Provides producer consumer functionality.
Here we have separate threads for consumers.
The producer is the main thread and queues the produced
products using method produced
Author:
Juergen
  • Constructor Summary

    Constructors
    Constructor
    Description
    Consumer(int queueCapacity, int numberOfConsumerThreads, T endProductMessage)
    Create consumer threads.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    produced(T product)
    Queue produced product
    void
    Indicate consumers that production has been finished
    void
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Consumer

      public Consumer(int queueCapacity, int numberOfConsumerThreads, T endProductMessage)
      Create consumer threads.
      queueCapacity is the capacity of the queue
      for queueing products.
      Parameters:
      queueCapacity -
  • Method Details