public interface FlowRegistryClient extends ConfigurableComponent
Represents and external source, where flows might be stored and retrieved from. The interface provides the possibility to have multiple different types of registries backing NiFi.
FlowRegistryClient
s are discovered using Java's
ServiceLoader
mechanism. As a result, all implementations must
follow these rules:
META-INF/services
directory. This file contains a list of
fully-qualified class names of all FlowRegistryClient
s in the
jar, one-per-line.
FlowRegistryClient
instances are always considered "active" and approachable when the validation status is considered as valid.
Therefore after initialize, implementations must expect incoming requests any time.
The argument list of the request methods contain instances FlowRegistryClientConfigurationContext
, which always contains the current
state of the properties. Caching properties between method calls is not recommended.
Modifier and Type | Method and Description |
---|---|
RegisteredFlow |
deregisterFlow(FlowRegistryClientConfigurationContext context,
String bucketId,
String flowId)
Deletes the specified flow from the Flow Registry.
|
FlowRegistryBucket |
getBucket(FlowRegistryClientConfigurationContext context,
String bucketId)
Gets the bucket with the given id.
|
Set<FlowRegistryBucket> |
getBuckets(FlowRegistryClientConfigurationContext context)
Gets the buckets for the specified user.
|
RegisteredFlow |
getFlow(FlowRegistryClientConfigurationContext context,
String bucketId,
String flowId)
Retrieves a flow by bucket id and Flow id.
|
RegisteredFlowSnapshot |
getFlowContents(FlowRegistryClientConfigurationContext context,
String bucketId,
String flowId,
int version)
Retrieves the contents of the flow with the given Bucket id, Flow id, and version, from the Registry.
|
Set<RegisteredFlow> |
getFlows(FlowRegistryClientConfigurationContext context,
String bucketId)
Retrieves the set of all Flows for the specified bucket.
|
Set<RegisteredFlowSnapshotMetadata> |
getFlowVersions(FlowRegistryClientConfigurationContext context,
String bucketId,
String flowId)
Retrieves the set of all versions of the specified flow.
|
int |
getLatestVersion(FlowRegistryClientConfigurationContext context,
String bucketId,
String flowId)
Returns the latest (most recent) version of the Flow in the Flow Registry for the given bucket and Flow.
|
void |
initialize(FlowRegistryClientInitializationContext context) |
boolean |
isStorageLocationApplicable(FlowRegistryClientConfigurationContext context,
String location)
Decides if the given location is applicable by the repository instance.
|
RegisteredFlow |
registerFlow(FlowRegistryClientConfigurationContext context,
RegisteredFlow flow)
Registers the given RegisteredFlow into the the Flow Registry.
|
RegisteredFlowSnapshot |
registerFlowSnapshot(FlowRegistryClientConfigurationContext context,
RegisteredFlowSnapshot flowSnapshot)
Adds the given snapshot to the Flow Registry for the given Flow.
|
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
void initialize(FlowRegistryClientInitializationContext context)
boolean isStorageLocationApplicable(FlowRegistryClientConfigurationContext context, String location)
context
- Configuration context.location
- The location to check.Set<FlowRegistryBucket> getBuckets(FlowRegistryClientConfigurationContext context) throws FlowRegistryException, IOException
context
- Configuration context.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.FlowRegistryBucket getBucket(FlowRegistryClientConfigurationContext context, String bucketId) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.NoSuchBucketException
- If there is no bucket in the Registry with the given id.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.RegisteredFlow registerFlow(FlowRegistryClientConfigurationContext context, RegisteredFlow flow) throws FlowRegistryException, IOException
context
- Configuration context.flow
- The RegisteredFlow to add to the Registry.FlowAlreadyExistsException
- If a Flow with the given identifier already exists in the registry.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.RegisteredFlow deregisterFlow(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.flowId
- The id of the flow.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.RegisteredFlow getFlow(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.flowId
- The id of the Flow.NoSuchFlowException
- If there is no Flow in the bucket with the given id.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.Set<RegisteredFlow> getFlows(FlowRegistryClientConfigurationContext context, String bucketId) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.RegisteredFlowSnapshot getFlowContents(FlowRegistryClientConfigurationContext context, String bucketId, String flowId, int version) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.flowId
- The id of the Flow.version
- The version to retrieve.NoSuchFlowVersionException
- If there is no version of the Flow with the given version number.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.RegisteredFlowSnapshot registerFlowSnapshot(FlowRegistryClientConfigurationContext context, RegisteredFlowSnapshot flowSnapshot) throws FlowRegistryException, IOException
context
- Configuration context.flowSnapshot
- The flow snapshot to register.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.Set<RegisteredFlowSnapshotMetadata> getFlowVersions(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.flowId
- The id of the flow.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.int getLatestVersion(FlowRegistryClientConfigurationContext context, String bucketId, String flowId) throws FlowRegistryException, IOException
context
- Configuration context.bucketId
- The id of the bucket.flowId
- The id of the flow.FlowRegistryException
- If an issue happens during processing the request.IOException
- If there is issue with the communication between NiFi and the Flow Registry.Copyright © 2023 Apache NiFi Project. All rights reserved.