Package org.apache.nifi.connectable
Class StandardConnection
java.lang.Object
org.apache.nifi.connectable.StandardConnection
- All Implemented Interfaces:
Authorizable,VersionedComponent,Connection
Models a connection between connectable components. A connection may contain
one or more relationships that map the source component to the destination
component.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<List<Position>> static final longprivate final AtomicReference<Connectable> private FlowFileQueueprivate final intprivate final Stringprivate final AtomicIntegerprivate final AtomicReference<String> private final AtomicReference<ProcessGroup> private final AtomicReference<Collection<org.apache.nifi.processor.Relationship>> private final ProcessSchedulerprivate final Connectableprivate final AtomicReference<String> private final AtomicLong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidauthorize(Authorizer authorizer, RequestAction action, NiFiUser user, Map<String, String> resourceContext) checkAuthorization(Authorizer authorizer, RequestAction action, NiFiUser user, Map<String, String> resourceContext) voidenqueue(Collection<FlowFileRecord> flowFiles) voidenqueue(FlowFileRecord flowFile) Gives this Connection ownership of the given FlowFile and allows the Connection to hold on to the FlowFile but NOT provide the FlowFile to consumers.booleanintgetName()Collection<org.apache.nifi.processor.Relationship> longinthashCode()voidlock()poll(Set<FlowFileRecord> expiredRecords) poll(org.apache.nifi.processor.FlowFileFilter filter, Set<FlowFileRecord> expiredRecords) voidsetBendPoints(List<Position> position) voidsetDestination(Connectable newDestination) voidsetLabelIndex(int labelIndex) voidvoidsetProcessGroup(ProcessGroup newGroup) voidsetRelationships(Collection<org.apache.nifi.processor.Relationship> newRelationships) voidsetVersionedComponentId(String versionedComponentId) voidsetZIndex(long zIndex) toString()voidunlock()voidvoidprivate voidverifySourceStoppedOrFunnel(Connection connection) private voidverifySourceStoppedOrFunnel(Connection connection, Set<Connection> connectionsSeen) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.authorization.resource.Authorizable
authorize, checkAuthorization, getRequestedResource, isAuthorized
-
Field Details
-
DEFAULT_Z_INDEX
public static final long DEFAULT_Z_INDEX- See Also:
-
id
-
processGroup
-
name
-
bendPoints
-
source
-
destination
-
relationships
-
labelIndex
-
zIndex
-
versionedComponentId
-
scheduler
-
hashCode
private final int hashCode -
flowFileQueue
-
-
Constructor Details
-
StandardConnection
-
-
Method Details
-
getProcessGroup
- Specified by:
getProcessGroupin interfaceConnection
-
getIdentifier
- Specified by:
getIdentifierin interfaceConnection
-
getName
- Specified by:
getNamein interfaceConnection
-
setName
- Specified by:
setNamein interfaceConnection
-
getParentAuthorizable
- Specified by:
getParentAuthorizablein interfaceAuthorizable
-
getResource
- Specified by:
getResourcein interfaceAuthorizable
-
getSourceAuthorizable
- Specified by:
getSourceAuthorizablein interfaceConnection
-
getDestinationAuthorizable
- Specified by:
getDestinationAuthorizablein interfaceConnection
-
checkAuthorization
public AuthorizationResult checkAuthorization(Authorizer authorizer, RequestAction action, NiFiUser user, Map<String, String> resourceContext) - Specified by:
checkAuthorizationin interfaceAuthorizable
-
authorize
public void authorize(Authorizer authorizer, RequestAction action, NiFiUser user, Map<String, String> resourceContext) throws AccessDeniedException- Specified by:
authorizein interfaceAuthorizable- Throws:
AccessDeniedException
-
getBendPoints
- Specified by:
getBendPointsin interfaceConnection
-
setBendPoints
- Specified by:
setBendPointsin interfaceConnection
-
getLabelIndex
public int getLabelIndex()- Specified by:
getLabelIndexin interfaceConnection
-
setLabelIndex
public void setLabelIndex(int labelIndex) - Specified by:
setLabelIndexin interfaceConnection
-
getZIndex
public long getZIndex()- Specified by:
getZIndexin interfaceConnection
-
setZIndex
public void setZIndex(long zIndex) - Specified by:
setZIndexin interfaceConnection
-
getSource
- Specified by:
getSourcein interfaceConnection
-
getDestination
- Specified by:
getDestinationin interfaceConnection
-
getRelationships
- Specified by:
getRelationshipsin interfaceConnection
-
getFlowFileQueue
- Specified by:
getFlowFileQueuein interfaceConnection
-
setProcessGroup
- Specified by:
setProcessGroupin interfaceConnection
-
setRelationships
- Specified by:
setRelationshipsin interfaceConnection
-
setDestination
- Specified by:
setDestinationin interfaceConnection
-
lock
public void lock()- Specified by:
lockin interfaceConnection
-
unlock
public void unlock()- Specified by:
unlockin interfaceConnection
-
poll
public List<FlowFileRecord> poll(org.apache.nifi.processor.FlowFileFilter filter, Set<FlowFileRecord> expiredRecords) - Specified by:
pollin interfaceConnection
-
poll
- Specified by:
pollin interfaceConnection
-
equals
-
hashCode
public int hashCode() -
toString
-
enqueue
Gives this Connection ownership of the given FlowFile and allows the Connection to hold on to the FlowFile but NOT provide the FlowFile to consumers. This allows us to ensure that the Connection is not deleted during the middle of a Session commit.- Specified by:
enqueuein interfaceConnection- Parameters:
flowFile- to add
-
enqueue
- Specified by:
enqueuein interfaceConnection
-
verifyCanUpdate
public void verifyCanUpdate()- Specified by:
verifyCanUpdatein interfaceConnection
-
verifyCanDelete
public void verifyCanDelete()- Specified by:
verifyCanDeletein interfaceConnection
-
verifySourceStoppedOrFunnel
-
verifySourceStoppedOrFunnel
-
getVersionedComponentId
- Specified by:
getVersionedComponentIdin interfaceVersionedComponent
-
setVersionedComponentId
- Specified by:
setVersionedComponentIdin interfaceVersionedComponent
-