ctubbsii commented on code in PR #3678:
URL: https://github.com/apache/accumulo/pull/3678#discussion_r1289550871


##########
core/src/main/java/org/apache/accumulo/core/spi/common/ContextClassLoaderFactory.java:
##########
@@ -65,4 +65,15 @@ default void init(ContextClassLoaderEnvironment env) {}
    * @return the class loader for the given contextName
    */
   ClassLoader getClassLoader(String contextName);
+
+  /**
+   * Validate that the contextName is supported by the 
ContextClassLoaderFactory implementation
+   *
+   * @param contextName the name of the context that represents a class loader 
that is managed by
+   *        this factory (can be null)
+   * @return true if valid, false otherwise
+   */
+  default boolean isValid(String contextName) {
+    return false;

Review Comment:
   This is moot if we follow @keith-turner 's suggestion to use 
`getClassLoader(contextName)` as the default implementation, which I think is a 
good idea. If this returns something not null without throwing an exception, 
then this method should return true. If an implementation needs to avoid 
constructing the classloaders for some reason, then it can override the default 
method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to