public interface Connectable extends Triggerable, ComponentAuthorizable, Positionable
MINIMUM_SCHEDULING_NANOS
Modifier and Type | Method and Description |
---|---|
void |
addConnection(Connection connection)
Adds the given connection to this Connectable.
|
java.lang.String |
getComments() |
java.lang.String |
getComponentType() |
ConnectableType |
getConnectableType() |
java.util.Set<Connection> |
getConnections() |
java.util.Set<Connection> |
getConnections(Relationship relationship) |
java.lang.String |
getIdentifier()
The identifier of the underlying component.
|
java.util.List<Connection> |
getIncomingConnections() |
java.lang.String |
getName() |
java.lang.String |
getPenalizationPeriod() |
long |
getPenalizationPeriod(java.util.concurrent.TimeUnit timeUnit) |
ProcessGroup |
getProcessGroup() |
Relationship |
getRelationship(java.lang.String relationshipName)
Returns the ProcessorRelationship whose name is given
|
java.util.Collection<Relationship> |
getRelationships() |
SchedulingStrategy |
getSchedulingStrategy() |
java.util.Collection<ValidationResult> |
getValidationErrors() |
long |
getYieldExpiration() |
java.lang.String |
getYieldPeriod() |
long |
getYieldPeriod(java.util.concurrent.TimeUnit timeUnit) |
boolean |
hasIncomingConnection() |
boolean |
isAutoTerminated(Relationship relationship) |
boolean |
isLossTolerant() |
boolean |
isSideEffectFree() |
boolean |
isTriggerWhenEmpty() |
void |
removeConnection(Connection connection) |
void |
setComments(java.lang.String comments)
Sets the comments of this Connectable.
|
void |
setLossTolerant(boolean lossTolerant) |
void |
setName(java.lang.String name)
Sets the name of this Connectable so that its name will be visible on the
UI
|
void |
setPenalizationPeriod(java.lang.String penalizationPeriod)
Updates the amount of time that this Connectable will penalize FlowFiles
when
ProcessSession.penalize(org.apache.nifi.flowfile.FlowFile) is called |
void |
setProcessGroup(ProcessGroup group)
Sets the new ProcessGroup to which this
Connectable belongs |
void |
setYieldPeriod(java.lang.String yieldPeriod)
Updates the amount of time that this Connectable should avoid being
scheduled when the processor calls
ProcessContext.yield() |
void |
updateConnection(Connection newConnection)
Updates any internal state that depends on the given connection.
|
void |
verifyCanClearState() |
void |
verifyCanDelete() |
void |
verifyCanDelete(boolean ignoreConnections) |
void |
verifyCanDisable() |
void |
verifyCanEnable() |
void |
verifyCanStart() |
void |
verifyCanStop() |
void |
verifyCanUpdate() |
void |
yield()
Causes the processor not to be scheduled for some period of time.
|
getMaxConcurrentTasks, getScheduledState, getSchedulingPeriod, getSchedulingPeriod, isRunning, onTrigger, setMaxConcurrentTasks, setScheduldingPeriod
getProcessGroupIdentifier
authorize, authorize, checkAuthorization, checkAuthorization, getParentAuthorizable, getRequestedResource, getResource, isAuthorized
getPosition, setPosition
java.lang.String getIdentifier()
ComponentAuthorizable
getIdentifier
in interface ComponentAuthorizable
Connectable
java.util.Collection<Relationship> getRelationships()
Relationship getRelationship(java.lang.String relationshipName)
relationshipName
- namenull
if none existsvoid addConnection(Connection connection) throws java.lang.IllegalArgumentException
connection
- the connection to addjava.lang.NullPointerException
- if the argument is nulljava.lang.IllegalArgumentException
- if the given Connection is not validboolean hasIncomingConnection()
void removeConnection(Connection connection) throws java.lang.IllegalStateException
connection
- to removejava.lang.IllegalStateException
- if the given Connection is not registered
to this
.void updateConnection(Connection newConnection) throws java.lang.IllegalStateException
newConnection
- new connectionjava.lang.IllegalStateException
- isejava.util.List<Connection> getIncomingConnections()
Set
of all Connection
s for which this
Connectable
is the destinationjava.util.Set<Connection> getConnections()
Set
of all Connection
s for which this
Connectable
is the source; if no connections exist, will
return an empty Collection. Guaranteed not null.java.util.Set<Connection> getConnections(Relationship relationship)
relationship
- to get connections forSet
of all Connection
s that contain
the given relationship for which this Connectable
is the
sourcejava.lang.String getName()
void setName(java.lang.String name)
name
- new namejava.lang.String getComments()
void setComments(java.lang.String comments)
comments
- of this Connectableboolean isTriggerWhenEmpty()
Triggerable.onTrigger(org.apache.nifi.processor.ProcessContext, org.apache.nifi.processor.ProcessSessionFactory)
should be called even when this Connectable has no FlowFiles queued for
processingProcessGroup getProcessGroup()
Connectable
belongsvoid setProcessGroup(ProcessGroup group)
Connectable
belongsgroup
- new groupboolean isAutoTerminated(Relationship relationship)
relationship
- the relationshipboolean isLossTolerant()
void setLossTolerant(boolean lossTolerant)
lossTolerant
- true if it isConnectableType getConnectableType()
java.util.Collection<ValidationResult> getValidationErrors()
long getPenalizationPeriod(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- unit over which to interpret the durationProcessSession.penalize(org.apache.nifi.flowfile.FlowFile)
is calledjava.lang.String getPenalizationPeriod()
ProcessSession.penalize(org.apache.nifi.flowfile.FlowFile)
is calledlong getYieldPeriod(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- determines the unit of time to represent the yield
period.java.lang.String getYieldPeriod()
void setYieldPeriod(java.lang.String yieldPeriod)
ProcessContext.yield()
yieldPeriod
- new yield periodvoid setPenalizationPeriod(java.lang.String penalizationPeriod)
ProcessSession.penalize(org.apache.nifi.flowfile.FlowFile)
is calledpenalizationPeriod
- new periodvoid yield()
getYieldPeriod(TimeUnit)
and
setYieldPeriod(String yieldPeriod)
methods.long getYieldExpiration()
boolean isSideEffectFree()
void verifyCanDelete() throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanDelete(boolean ignoreConnections) throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanStart() throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanStop() throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanUpdate() throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanEnable() throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanDisable() throws java.lang.IllegalStateException
java.lang.IllegalStateException
void verifyCanClearState() throws java.lang.IllegalStateException
java.lang.IllegalStateException
SchedulingStrategy getSchedulingStrategy()
java.lang.String getComponentType()