Class ComponentMetadata
- java.lang.Object
-
- org.infinispan.factories.components.ComponentMetadata
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ManageableComponentMetadata
public class ComponentMetadata extends java.lang.Object implements java.io.SerializableThis class contains all of the metadata and implications expressed via theScope,SurvivesRestarts,DefaultFactoryFor,ComponentName,Inject,StartandStopannotations. Instead of scanning for these annotations and working out dependency chains at runtime "on-demand", since Infinispan 5.1, this process now happens offline, at build-time. When compiling Infinispan, components and their dependency chains are inspected and the information expressed by the annotations above are denormalized and a series ofComponentMetadataobjects are created and persisted in the Infinispan jar. This metadata is then read in by theComponentMetadataRepoat runtime, and used by theComponentRegistryand other factory-like classes to bootstrap an Infinispan node. Also seeManageableComponentMetadatafor components that also expose JMX information.- Since:
- 5.1
- Author:
- Manik Surtani
- See Also:
ManageableComponentMetadata,ComponentMetadataRepo, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classComponentMetadata.InjectFieldMetadatastatic classComponentMetadata.InjectMethodMetadataThis class encapsulates metadata on an inject method, such as one annotated withInjectstatic classComponentMetadata.PrioritizedMethodMetadata
-
Field Summary
Fields Modifier and Type Field Description static ComponentMetadata.InjectMethodMetadata[]EMPTY_INJECT_METHODSstatic ComponentMetadata.PrioritizedMethodMetadata[]EMPTY_PRIORITIZED_METHODS
-
Constructor Summary
Constructors Constructor Description ComponentMetadata(java.lang.Class<?> component, java.util.List<java.lang.reflect.Field> injectFields, java.util.List<java.lang.reflect.Method> injectMethods, java.util.List<java.lang.reflect.Method> startMethods, java.util.List<java.lang.reflect.Method> postStartMethods, java.util.List<java.lang.reflect.Method> stopMethods, boolean global, boolean survivesRestarts)ComponentMetadata(java.lang.Class<?> component, java.util.List<java.lang.reflect.Field> injectFields, java.util.List<java.lang.reflect.Method> injectMethods, java.util.List<java.lang.reflect.Method> startMethods, java.util.List<java.lang.reflect.Method> postStartMethods, java.util.List<java.lang.reflect.Method> stopMethods, Scopes scope, boolean survivesRestarts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringextractDependencyType(java.lang.reflect.Type erasedType, java.lang.reflect.Type genericType, boolean lazy)java.lang.Class<?>getClazz()java.util.Map<java.lang.String,java.lang.String>getDependencies()ComponentMetadata.InjectFieldMetadata[]getInjectFields()ComponentMetadata.InjectMethodMetadata[]getInjectMethods()java.lang.StringgetName()ComponentMetadata.PrioritizedMethodMetadata[]getPostStartMethods()ScopesgetScope()ComponentMetadata.PrioritizedMethodMetadata[]getStartMethods()ComponentMetadata.PrioritizedMethodMetadata[]getStopMethods()booleanisGlobalScope()booleanisManageable()booleanisSurvivesRestarts()ManageableComponentMetadatatoManageableComponentMetadata()java.lang.StringtoString()
-
-
-
Field Detail
-
EMPTY_INJECT_METHODS
public static final ComponentMetadata.InjectMethodMetadata[] EMPTY_INJECT_METHODS
-
EMPTY_PRIORITIZED_METHODS
public static final ComponentMetadata.PrioritizedMethodMetadata[] EMPTY_PRIORITIZED_METHODS
-
-
Constructor Detail
-
ComponentMetadata
public ComponentMetadata(java.lang.Class<?> component, java.util.List<java.lang.reflect.Field> injectFields, java.util.List<java.lang.reflect.Method> injectMethods, java.util.List<java.lang.reflect.Method> startMethods, java.util.List<java.lang.reflect.Method> postStartMethods, java.util.List<java.lang.reflect.Method> stopMethods, boolean global, boolean survivesRestarts)
-
ComponentMetadata
public ComponentMetadata(java.lang.Class<?> component, java.util.List<java.lang.reflect.Field> injectFields, java.util.List<java.lang.reflect.Method> injectMethods, java.util.List<java.lang.reflect.Method> startMethods, java.util.List<java.lang.reflect.Method> postStartMethods, java.util.List<java.lang.reflect.Method> stopMethods, Scopes scope, boolean survivesRestarts)
-
-
Method Detail
-
extractDependencyType
public java.lang.String extractDependencyType(java.lang.reflect.Type erasedType, java.lang.reflect.Type genericType, boolean lazy)
-
getName
public java.lang.String getName()
-
getDependencies
public java.util.Map<java.lang.String,java.lang.String> getDependencies()
-
getInjectFields
public ComponentMetadata.InjectFieldMetadata[] getInjectFields()
-
getInjectMethods
public ComponentMetadata.InjectMethodMetadata[] getInjectMethods()
-
getStartMethods
public ComponentMetadata.PrioritizedMethodMetadata[] getStartMethods()
-
getPostStartMethods
public ComponentMetadata.PrioritizedMethodMetadata[] getPostStartMethods()
-
getStopMethods
public ComponentMetadata.PrioritizedMethodMetadata[] getStopMethods()
-
isGlobalScope
public boolean isGlobalScope()
-
isSurvivesRestarts
public boolean isSurvivesRestarts()
-
isManageable
public boolean isManageable()
-
getClazz
public java.lang.Class<?> getClazz()
-
toManageableComponentMetadata
public ManageableComponentMetadata toManageableComponentMetadata()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getScope
public Scopes getScope()
-
-