|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
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 Supplier . 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 com.google.common.base.Supplier<Collection> |
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 List<Pipeline<? extends 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 |
doDestroy()
|
protected void |
doExecute(Collection<Item<?>> itemCollection)
Performs the stage processing on the given Item collection. |
protected void |
doInitialize()
|
com.google.common.base.Supplier<Collection> |
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<? extends Item<?>>> |
getMergedPipelines()
Gets the unmodifiable set of pipelines used by this stage. |
void |
setCollectionFactory(com.google.common.base.Supplier<Collection> 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<? extends Pipeline<? extends Item<?>>> pipelines)
Sets the pipelines joined by this stage. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute, setId |
| Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent |
|---|
getId |
| Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent |
|---|
destroy, initialize, isDestroyed, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent |
|---|
destroy, isDestroyed |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent |
|---|
getId |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent |
|---|
initialize, isInitialized |
| Field Detail |
|---|
private ExecutorService executorService
private com.google.common.base.Supplier<Collection> collectionFactory
SimpleItemCollectionFactory.
private CollectionMergeStrategy mergeStrategy
private List<Pipeline<? extends Item<?>>> mergedPipelines
| Constructor Detail |
|---|
public PipelineMergeStage()
| Method Detail |
|---|
@Nonnull public ExecutorService getExecutorService()
public void setExecutorService(@Nonnull
ExecutorService service)
service - executor service used to run the selected and non-selected item pipelines@Nonnull @NonnullElements @Unmodifiable public List<Pipeline<? extends Item<?>>> getMergedPipelines()
public void setMergedPipelines(@Nullable@NullableElements
List<? extends Pipeline<? extends Item<?>>> pipelines)
pipelines - pipelines joined by this stage@Nonnull public com.google.common.base.Supplier<Collection> getCollectionFactory()
Item collection produced by this source.
Item collection produced by this source
public void setCollectionFactory(@Nonnull
com.google.common.base.Supplier<Collection> factory)
Item collection produced by this source.
factory - factory used to create the Item collection produced by this source@Nonnull public CollectionMergeStrategy getCollectionMergeStrategy()
public void setCollectionMergeStrategy(@Nonnull
CollectionMergeStrategy strategy)
strategy - strategy used to merge all the joined pipeline results in to the final Item collection, never
null
protected void doExecute(@Nonnull@NonnullElements
Collection<Item<?>> itemCollection)
throws StageProcessingException
The stage is guaranteed to be have been initialized and not destroyed when this is invoked.
doExecute in class BaseStage<Item<?>>itemCollection - collection to be processed
StageProcessingException - thrown if there is an unrecoverable problem when processing the stageprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
protected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||