public interface Processor<T,R>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Processor.ProcessorType
This method determines what type of processing should be performed on the
inbound information.
|
| 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.
|
Processor.ProcessorType getType()
void initialise(String tenantId, List<T> items) throws RetryAttemptException
tenantId - The optional tenant iditems - RetryAttemptException - Failed to process the itemR processOneToOne(String tenantId, T item) throws RetryAttemptException
tenantId - The optional tenant iditem - The itemRetryAttemptException - Failed to process the itemList<R> processOneToMany(String tenantId, T item) throws RetryAttemptException
tenantId - The optional tenant iditem - The itemRetryAttemptException - Failed to process the itemList<R> processManyToMany(String tenantId, List<T> items) throws RetryAttemptException
tenantId - The optional tenant iditems - The itemsRetryAttemptException - Failed to process the itemlong getDeliveryDelay(List<R> results)
results - The resultslong getRetryDelay(List<T> items, int retryCount)
items - The itemsretryCount - The retry countvoid cleanup(String tenantId, List<T> items)
tenantId - The optional tenant iditems - Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.