Class ComponentMetadataRepo
- java.lang.Object
-
- org.infinispan.factories.components.ComponentMetadataRepo
-
@Deprecated public class ComponentMetadataRepo extends java.lang.ObjectDeprecated.Since 10.0, no longer used and will be removed.This is a repository of component metadata, which is populated when the Infinispan core jar is loaded up. Actual metadata is analyzed and persisted into the jar at build-time, taking it off the critical path.- Since:
- 5.1
- Author:
- Manik Surtani
- See Also:
ComponentMetadata
-
-
Constructor Summary
Constructors Constructor Description ComponentMetadataRepo()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ComponentMetadatafindComponentMetadata(java.lang.Class<?> componentType)Deprecated.Since 9.4, please usefindComponentMetadata(String)instead.ComponentMetadatafindComponentMetadata(java.lang.String componentName)Deprecated.Since 9.4, please usefindComponentMetadata(String)instead.java.lang.StringfindFactoryForComponent(java.lang.Class<?> componentType)Deprecated.Locates the fully qualified class name of a factory capable of constructing an instance ofjava.lang.StringfindFactoryForComponent(java.lang.String componentName)Deprecated.Locates the fully qualified class name of a factory capable of constructing an instance ofComponentMetadatagetComponentMetadata(java.lang.Class<?> componentClass)Deprecated.Look up metadata for a component class.booleanhasFactory(java.lang.String name)Deprecated.voidinitialize(java.lang.Iterable<ModuleMetadataFileFinder> moduleMetadataFiles, java.lang.ClassLoader cl)Deprecated.Initializes this repository.voidinjectFactoryForComponent(java.lang.Class<?> componentType, java.lang.Class<?> factoryType)Deprecated.For testing purposes only.voidreadMetadata(java.net.URL metadataFile)Deprecated.
-
-
-
Method Detail
-
readMetadata
public void readMetadata(java.net.URL metadataFile) throws java.io.IOException, java.lang.ClassNotFoundExceptionDeprecated.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
findComponentMetadata
@Deprecated public ComponentMetadata findComponentMetadata(java.lang.Class<?> componentType)
Deprecated.Since 9.4, please usefindComponentMetadata(String)instead.Locates metadata for a given component type if registered. If not registered, superclasses/interfaces are consulted, until, finally, an empty instance ofComponentMetadatais returned effectively declaring that the component has no dependencies or any lifecycle methods declared.- Parameters:
componentType- component type to look for- Returns:
- metadata expressed as a ComponentMetadata instance
-
findComponentMetadata
@Deprecated public ComponentMetadata findComponentMetadata(java.lang.String componentName)
Deprecated.Since 9.4, please usefindComponentMetadata(String)instead.Locates metadata for a given component type if registered. If not registered, a null is returned.- Parameters:
componentName- name of component type to look for- Returns:
- metadata expressed as a ComponentMetadata instance, or null
-
getComponentMetadata
public ComponentMetadata getComponentMetadata(java.lang.Class<?> componentClass)
Deprecated.Look up metadata for a component class.If the class does not have any metadata, tries to look up the metadata of its superclasses. This is needed for mocks and other classes generated at runtime.
Do not use for looking up the metadata of an interface, e.g. to determine the scope of a component that doesn't exist.
-
findFactoryForComponent
public java.lang.String findFactoryForComponent(java.lang.Class<?> componentType)
Deprecated.Locates the fully qualified class name of a factory capable of constructing an instance ofcomponentType
. Typically this is a factory annotated withDefaultFactoryFor.- Parameters:
componentType- component to create- Returns:
- a factory, or null if not found.
-
findFactoryForComponent
public java.lang.String findFactoryForComponent(java.lang.String componentName)
Deprecated.Locates the fully qualified class name of a factory capable of constructing an instance ofcomponentType
. Typically this is a factory annotated withDefaultFactoryFor.- Parameters:
componentName- component to create- Returns:
- a factory, or null if not found.
-
initialize
public void initialize(java.lang.Iterable<ModuleMetadataFileFinder> moduleMetadataFiles, java.lang.ClassLoader cl)
Deprecated.Initializes this repository. The Iterable passed in should contain allModuleMetadataFileFinderinstances for all loaded Infinispan modules. Note that the core module is always loaded and need not be contained in this iterable.- Parameters:
moduleMetadataFiles- file finders to iterate through and load into the repository
-
injectFactoryForComponent
@Deprecated public void injectFactoryForComponent(java.lang.Class<?> componentType, java.lang.Class<?> factoryType)Deprecated.For testing purposes only.Inject a factory for a given component type.- Parameters:
componentType- Component type that the factory will producefactoryType- Factory that produces the given type of components
-
hasFactory
public boolean hasFactory(java.lang.String name)
Deprecated.
-
-