Package org.jesterj.ingest.routers
Class DuplicateToAll
- java.lang.Object
-
- org.jesterj.ingest.routers.RouterBase
-
- org.jesterj.ingest.routers.DuplicateToAll
-
- All Implemented Interfaces:
Configurable,Router
public class DuplicateToAll extends RouterBase
A router that simply duplicates the document to all subsequent steps. Note that like all routers it is constrained to only select steps for which the document is eligible.- See Also:
Step.getEligibleNextSteps(Document)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDuplicateToAll.Builder
-
Field Summary
-
Fields inherited from interface org.jesterj.ingest.model.Configurable
VALID_NAME
-
-
Constructor Summary
Constructors Constructor Description DuplicateToAll()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()A name for this object to distinguish it from other objects.intgetNumberOfOutputCopies()Indicates how many copies of a document may be omitted by this router.booleanisConstantNumberOfOutputDocs()Indicates if the number documents entering this router have a constant linear relationship to the number of documents exiting the router.booleanisDeterministic()Indicates if this router will always route an identical document to the same downstream step or steps.NextStepsroute(Document doc)Decide where to send this document.-
Methods inherited from class org.jesterj.ingest.routers.RouterBase
getStep, updateExcludedDestinations
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jesterj.ingest.model.Configurable
isValidName
-
-
-
-
Method Detail
-
isDeterministic
public boolean isDeterministic()
Description copied from interface:RouterIndicates if this router will always route an identical document to the same downstream step or steps. It is important to understand that this attribute refers to determinism with respect to document content and anything that depends on the order in which documents are fed, is NOT deterministic.- Returns:
- True if the document's destination is deterministic, false if it may vary.
-
isConstantNumberOfOutputDocs
public boolean isConstantNumberOfOutputDocs()
Description copied from interface:RouterIndicates if the number documents entering this router have a constant linear relationship to the number of documents exiting the router. This relationship need only be constant for a particular plan configuration, and may vary when configured differently in different plans. A document may be considered to have exited the router if it records a terminal status (i.e.Status.DROPPED, or if it is included in the NextSteps object returned fromRouter.route(Document)- Returns:
- True if one document in produces a constant number of documents out.
-
getNumberOfOutputCopies
public int getNumberOfOutputCopies()
Description copied from interface:RouterIndicates how many copies of a document may be omitted by this router. IfRouter.isConstantNumberOfOutputDocs()returns false this number represents the maximum output. A negative value indicates that there is no constraint on the number of copies that may be omitted.- Returns:
- the number of output copies expected.
-
route
public NextSteps route(Document doc)
Description copied from interface:RouterDecide where to send this document. The result may represent some or all of the steps down stream. Note that it is illegal for a router not to select at least one destination, and this will cause errors. It is also prohibited for the router to select a destination not listed on the document.- Parameters:
doc- The document to route- Returns:
- An object encapsulating the destinations to which the document (or copies of it) will be sent.
- See Also:
Step.getEligibleNextSteps(Document)
-
getName
public java.lang.String getName()
Description copied from interface:ConfigurableA name for this object to distinguish it from other objects. This value is generally supplied by the plan author. Every object in a plan must have a unique name, begin with a letter and only contain letters, digits, underscores and periods.- Returns:
- The user supplied name for this step
-
-