@InterfaceAudience.LimitedPrivate(value="authorization-subsystems") @InterfaceStability.Unstable public final class ExtensionHelper extends Object
BoundDTExtension.| Modifier and Type | Method and Description |
|---|---|
static void |
bind(Object extension,
URI uri,
org.apache.hadoop.conf.Configuration conf)
If the passed in extension class implements
BoundDTExtension
then it will have its BoundDTExtension.bind(URI, Configuration)
method called. |
static void |
close(Object extension)
Close an extension if it is closeable.
|
static String |
getCanonicalServiceName(Object extension,
String def)
Invoke
BoundDTExtension.getCanonicalServiceName() or
return the default value. |
static String |
getUserAgentSuffix(Object extension,
String def)
Invoke
BoundDTExtension.getUserAgentSuffix() or
return the default value. |
static <V> Optional<V> |
ifBoundDTExtension(Object extension,
Function<? super BoundDTExtension,? extends V> fn)
Invoke an operation on an object if it implements the BoundDTExtension
interface; returns an optional value.
|
public static void bind(Object extension, URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException
BoundDTExtension
then it will have its BoundDTExtension.bind(URI, Configuration)
method called.extension - extension to examine and maybe invokeuri - URI of the filesystem.conf - configuration of this extension.IOException - failure during binding.public static void close(Object extension)
extension - extension instance.public static String getUserAgentSuffix(Object extension, String def)
BoundDTExtension.getUserAgentSuffix() or
return the default value.extension - extension to invokedef - default if the class is of the wrong type.public static String getCanonicalServiceName(Object extension, String def)
BoundDTExtension.getCanonicalServiceName() or
return the default value.extension - extension to invokedef - default if the class is of the wrong type.public static <V> Optional<V> ifBoundDTExtension(Object extension, Function<? super BoundDTExtension,? extends V> fn)
V - return type of te function.extension - the extension to invoke.fn - function to applyCopyright © 2008–2024 Apache Software Foundation. All rights reserved.