Processor.ProcessorType| Constructor and Description |
|---|
AbstractProcessor(Processor.ProcessorType type)
This constructor initialises the type of the processor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(String tenantId,
List<T> items)
This method is called once all of the items in the list of been
processed to generate new information.
|
long |
getDeliveryDelay(List<R> results)
This method determines the delivery delay (in milliseconds)
associated with the supplied list of results.
|
long |
getRetryDelay(List<T> items,
int retryCount)
This method determines the retry delay (in milliseconds)
associated with the supplied list of items.
|
Processor.ProcessorType |
getType()
This method identifies the type of the processor.
|
void |
initialise(String tenantId,
List<T> items)
This method enables the processor to perform some initialisation
tasks before processing the items individually to generate new
information.
|
List<R> |
processManyToMany(String tenantId,
List<T> items)
This method processes the supplied items to
generate zero or more resulting values.
|
List<R> |
processOneToMany(String tenantId,
T item)
This method processes the supplied item to
generate zero or more resulting values.
|
R |
processOneToOne(String tenantId,
T item)
This method processes the supplied item to optionally
generated a new resulting value.
|
public AbstractProcessor(Processor.ProcessorType type)
type - The typepublic Processor.ProcessorType getType()
Processorpublic void initialise(String tenantId, List<T> items) throws RetryAttemptException
Processorinitialise in interface Processor<T,R>tenantId - The optional tenant idRetryAttemptException - Failed to process the itempublic long getDeliveryDelay(List<R> results)
ProcessorgetDeliveryDelay in interface Processor<T,R>results - The resultspublic long getRetryDelay(List<T> items, int retryCount)
ProcessorgetRetryDelay in interface Processor<T,R>items - The itemsretryCount - The retry countpublic R processOneToOne(String tenantId, T item) throws RetryAttemptException
ProcessorprocessOneToOne in interface Processor<T,R>tenantId - The optional tenant iditem - The itemRetryAttemptException - Failed to process the itempublic List<R> processOneToMany(String tenantId, T item) throws RetryAttemptException
ProcessorprocessOneToMany in interface Processor<T,R>tenantId - The optional tenant iditem - The itemRetryAttemptException - Failed to process the itempublic List<R> processManyToMany(String tenantId, List<T> items) throws RetryAttemptException
ProcessorprocessManyToMany in interface Processor<T,R>tenantId - The optional tenant iditems - The itemsRetryAttemptException - Failed to process the itempublic void cleanup(String tenantId, List<T> items)
ProcessorCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.