public class Producer<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Producer.Consumer<T> |
Modifier and Type | Field and Description |
---|---|
String |
consumerType |
Constructor and Description |
---|
Producer(Class<T> clss,
Dispatcher dsptch,
Producer.Consumer<T> cons) |
Producer(Class<T> clss,
Producer.Consumer<T> cons,
Logger log) |
Modifier and Type | Method and Description |
---|---|
T |
consume() |
Dispatcher |
getDispatcher() |
void |
produce(ArrayList<T> items) |
void |
produce(T item) |
void |
produce(T[] items) |
void |
produce(T[] items,
int off,
int len) |
void |
shutdown() |
void |
shutdown(boolean consume_pending) |
public final String consumerType
public Producer(Class<T> clss, Dispatcher dsptch, Producer.Consumer<T> cons) throws IOException
IOException
public Producer(Class<T> clss, Producer.Consumer<T> cons, Logger log) throws IOException
IOException
public Dispatcher getDispatcher()
public void shutdown()
public void shutdown(boolean consume_pending)
public T consume()
public void produce(T item) throws IOException
IOException
public void produce(ArrayList<T> items) throws IOException
IOException
public void produce(T[] items, int off, int len) throws IOException
IOException
public void produce(T[] items) throws IOException
IOException
Copyright 2010-2018 Grey Software (Yusef Badri). All Rights Reserved.