Annotation Interface RequiresInstanceClassLoading


@Documented @Target(TYPE) @Retention(RUNTIME) @Inherited public @interface RequiresInstanceClassLoading
Marker annotation a component can use to indicate that the framework should create a new ClassLoader for each instance of the component, copying all resources from the component's NARClassLoader to a new ClassLoader which will only be used by a given instance of the component. If cloneAncestorResources is set to true, the instance ClassLoader will include ancestor resources up to the first ClassLoader containing a controller service API referenced by the component, or up to the Jetty NAR. Example #1 - PutHDFS has this flag set to true and does not reference any controller services, so it will include resources from nifi-hadoop-nar, nifi-hadoop-libraries-nar, and nifi-standard-services-api-nar, stopping at nifi-jetty-nar. Example #2 - If PutHDFS referenced an SSLContext and has this flag set to true, then it would include resources from nifi-hadoop-nar, nifi-hadoop-libraries-nar, and stop before nifi-standard-services-api-nar. Example #3 - HBaseClientService_1_1_2 does not have this flag set so it defaults to false, and therefore includes only resources from the nifi-hbase-client-service-1_1_2-nar. NOTE: When this annotation is used it is important to note that each added instance of the component will increase the overall memory footprint more than that of a component without this annotation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
     
  • Element Details

    • cloneAncestorResources

      boolean cloneAncestorResources
      Default:
      false