|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.metadata.pipeline.AbstractComponent
net.shibboleth.metadata.pipeline.BaseStage<Item<?>>
net.shibboleth.metadata.pipeline.PipelineMergeStage
@ThreadSafe public class PipelineMergeStage
This Stage allows the merging of multiple pipeline outputs into a single Collection that can then be
used as the input source for another pipeline.
This source works producing a Collection by means of the registered
ItemCollectionFactory . Then each of its registered Pipeline is invoked in
turn (no ordering is guaranteed and pipelines may execute concurrently). After each pipeline has completed the
results are merged in to the Item collection given to this stage by means of the an CollectionMergeStrategy.
| Field Summary | |
|---|---|
private ItemCollectionFactory |
collectionFactory
The factory used to create the item returned by this source. |
private ExecutorService |
executorService
Service used to execute the pipelines whose results will be merged. |
private Logger |
log
Class logger. |
private List<Pipeline<Item<?>>> |
mergedPipelines
Pipelines whose results become the output of this source. |
private CollectionMergeStrategy |
mergeStrategy
Strategy used to merge all the joined pipeline results in to the final Item collection. |
| Constructor Summary | |
|---|---|
PipelineMergeStage()
|
|
| Method Summary | |
|---|---|
protected void |
doExecute(Collection<Item<?>> itemCollection)
Performs the stage processing on the given Item collection. |
protected void |
doInitialize()
Do the initialization of the component. |
ItemCollectionFactory |
getCollectionFactory()
Gets the factory used to create the Item collection produced by this source. |
CollectionMergeStrategy |
getCollectionMergeStrategy()
Gets the strategy used to merge all the joined pipeline results in to the final Item collection. |
ExecutorService |
getExecutorService()
Gets the executor service used to run the selected and non-selected item pipelines. |
List<Pipeline<Item<?>>> |
getMergedPipelines()
Gets the unmodifiable set of pipelines used by this stage. |
void |
setCollectionFactory(ItemCollectionFactory factory)
Sets the factory used to create the Item collection produced by this source. |
void |
setCollectionMergeStrategy(CollectionMergeStrategy strategy)
Sets the strategy used to merge all the joined pipeline results in to the final Item collection. |
void |
setExecutorService(ExecutorService service)
Sets the executor service used to run the selected and non-selected item pipelines. |
void |
setMergedPipelines(List<Pipeline<Item<?>>> pipelines)
Sets the pipelines joined by this stage. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute |
| Methods inherited from class net.shibboleth.metadata.pipeline.AbstractComponent |
|---|
equals, getId, getInitializationInstant, hashCode, initialize, isInitialized, setId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.shibboleth.metadata.pipeline.Component |
|---|
getId, getInitializationInstant, initialize, isInitialized |
| Field Detail |
|---|
private final Logger log
private ExecutorService executorService
private ItemCollectionFactory collectionFactory
SimpleItemCollectionFactory.
private CollectionMergeStrategy mergeStrategy
private List<Pipeline<Item<?>>> mergedPipelines
| Constructor Detail |
|---|
public PipelineMergeStage()
| Method Detail |
|---|
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService service)
service - executor service used to run the selected and non-selected item pipelinespublic List<Pipeline<Item<?>>> getMergedPipelines()
public void setMergedPipelines(List<Pipeline<Item<?>>> pipelines)
pipelines - pipelines joined by this stagepublic ItemCollectionFactory getCollectionFactory()
Item collection produced by this source.
Item collection produced by this sourcepublic void setCollectionFactory(ItemCollectionFactory factory)
Item collection produced by this source.
factory - factory used to create the Item collection produced by this sourcepublic CollectionMergeStrategy getCollectionMergeStrategy()
public void setCollectionMergeStrategy(CollectionMergeStrategy strategy)
strategy - strategy used to merge all the joined pipeline results in to the final Item collection, never
null
protected void doExecute(Collection<Item<?>> itemCollection)
throws StageProcessingException
doExecute in class BaseStage<Item<?>>itemCollection - collection to be processed
StageProcessingException - thrown if there is an unrecoverable problem when processing the stage
protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractComponentComponentInitializationException - throw if there is a problem initializing the component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||