public final class CompositeDirectiveRegistry extends Object implements DirectiveRegistry
It implements the DirectiveRegistry interface. Search for a directives uses the order of the directives specified at the construction time.
If the directive is not found in any of the registry, then a null is returned.
| Constructor and Description |
|---|
CompositeDirectiveRegistry(DirectiveRegistry... registries) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes any resources acquired during initialization or otherwise.
|
DirectiveInfo |
get(String namespace,
String directive)
This method looks for the directive in all the registered registries.
|
ArtifactSummary |
getLatestWranglerArtifact()
Retrieve latest Wrangler transform artifact information
|
Iterable<DirectiveInfo> |
list(String namespace)
List the directives in the specified namespace
|
void |
reload(String namespace)
This method reloads the directives from the artifacts into the registry.
|
public CompositeDirectiveRegistry(DirectiveRegistry... registries)
@Nullable public DirectiveInfo get(String namespace, String directive) throws DirectiveLoadException
The order of search is as specified by the collection order. Upon finding the first valid instance of directive, the DirectiveInfo is returned.
get in interface DirectiveRegistrydirective - of the directive to be retrived from the registry.namespace - the namespace of the directiveDirectiveInfo if found, else null.DirectiveLoadExceptionpublic void reload(String namespace) throws DirectiveLoadException
DirectiveRegistryreload in interface DirectiveRegistrynamespace - the namespace to reload directives inDirectiveLoadException - thrown when there are any issues with loading
directives into the registry.@Nullable public ArtifactSummary getLatestWranglerArtifact()
DirectiveRegistrygetLatestWranglerArtifact in interface DirectiveRegistrypublic Iterable<DirectiveInfo> list(String namespace)
DirectiveRegistrylist in interface DirectiveRegistrynamespace - the namespace to list fromDirectiveInfo objects
maintained within the registry.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2022 CDAP Licensed under the Apache License, Version 2.0.