Class AbstractRepositoryContext
java.lang.Object
org.apache.nifi.controller.repository.AbstractRepositoryContext
- All Implemented Interfaces:
RepositoryContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Connectableprivate final AtomicLongprivate final ContentRepositoryprivate final CounterRepositoryprivate final FlowFileEventRepositoryprivate final FlowFileRepositoryprivate final ProvenanceEventRepositoryprivate final StateManager -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRepositoryContext(Connectable connectable, AtomicLong connectionIndex, ContentRepository contentRepository, FlowFileRepository flowFileRepository, FlowFileEventRepository flowFileEventRepository, CounterRepository counterRepository, ProvenanceEventRepository provenanceRepository, StateManager stateManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustCounter(String name, long delta) createProvenanceReporter(Predicate<FlowFile> flowfileKnownCheck, ProvenanceEventEnricher eventEnricher) getConnections(org.apache.nifi.processor.Relationship relationship) longintprotected StringbooleanisRelationshipAvailabilitySatisfied(int requiredNumber) A Relationship is said to be Available if and only if all Connections for that Relationship are either self-loops or have non-full queues.private booleanprivate booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.nifi.controller.repository.RepositoryContext
createContentClaimWriteCache
-
Field Details
-
connectable
-
contentRepo
-
flowFileRepo
-
flowFileEventRepo
-
counterRepo
-
provenanceRepo
-
connectionIndex
-
stateManager
-
-
Constructor Details
-
AbstractRepositoryContext
public AbstractRepositoryContext(Connectable connectable, AtomicLong connectionIndex, ContentRepository contentRepository, FlowFileRepository flowFileRepository, FlowFileEventRepository flowFileEventRepository, CounterRepository counterRepository, ProvenanceEventRepository provenanceRepository, StateManager stateManager)
-
-
Method Details
-
getConnectable
- Specified by:
getConnectablein interfaceRepositoryContext
-
getConnections
- Specified by:
getConnectionsin interfaceRepositoryContext- Parameters:
relationship- relationship- Returns:
- connections for relationship
-
getPollableConnections
- Specified by:
getPollableConnectionsin interfaceRepositoryContext- Returns:
- an unmodifiable list containing a copy of all incoming connections for the processor from which FlowFiles are allowed to be pulled
-
isTriggerWhenAnyDestinationAvailable
private boolean isTriggerWhenAnyDestinationAvailable() -
pollFromSelfLoopsOnly
private boolean pollFromSelfLoopsOnly()- Returns:
- true if we are allowed to take FlowFiles only from self-loops. This is the case when no Relationships are available except for self-looping Connections
-
adjustCounter
- Specified by:
adjustCounterin interfaceRepositoryContext
-
getContentRepository
- Specified by:
getContentRepositoryin interfaceRepositoryContext
-
getFlowFileRepository
- Specified by:
getFlowFileRepositoryin interfaceRepositoryContext
-
getFlowFileEventRepository
- Specified by:
getFlowFileEventRepositoryin interfaceRepositoryContext
-
getProvenanceRepository
- Specified by:
getProvenanceRepositoryin interfaceRepositoryContext
-
getNextFlowFileSequence
public long getNextFlowFileSequence()- Specified by:
getNextFlowFileSequencein interfaceRepositoryContext
-
getNextIncomingConnectionIndex
public int getNextIncomingConnectionIndex()- Specified by:
getNextIncomingConnectionIndexin interfaceRepositoryContext
-
isRelationshipAvailabilitySatisfied
public boolean isRelationshipAvailabilitySatisfied(int requiredNumber) A Relationship is said to be Available if and only if all Connections for that Relationship are either self-loops or have non-full queues.- Specified by:
isRelationshipAvailabilitySatisfiedin interfaceRepositoryContext- Parameters:
requiredNumber- minimum number of relationships that must have availability- Returns:
- Checks if at least
requiredNumberof Relationationships are "available." If so, returnstrue, otherwise returnsfalse
-
getProvenanceComponentDescription
-
getConnectableDescription
- Specified by:
getConnectableDescriptionin interfaceRepositoryContext
-
createProvenanceEventBuilder
- Specified by:
createProvenanceEventBuilderin interfaceRepositoryContext
-
createProvenanceReporter
public InternalProvenanceReporter createProvenanceReporter(Predicate<FlowFile> flowfileKnownCheck, ProvenanceEventEnricher eventEnricher) - Specified by:
createProvenanceReporterin interfaceRepositoryContext
-
getStateManager
- Specified by:
getStateManagerin interfaceRepositoryContext
-