Class ComponentMetadata
- java.lang.Object
-
- org.infinispan.factories.components.ComponentMetadata
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ManageableComponentMetadata
public class ComponentMetadata extends Object implements Serializable
This class contains all of the metadata and implications expressed via theScope
,SurvivesRestarts
,DefaultFactoryFor
,ComponentName
,Inject
,Start
andStop
annotations. 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 ofComponentMetadata
objects are created and persisted in the Infinispan jar. This metadata is then read in by theComponentMetadataRepo
at runtime, and used by theComponentRegistry
and other factory-like classes to bootstrap an Infinispan node. Also seeManageableComponentMetadata
for 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 class
ComponentMetadata.InjectFieldMetadata
static class
ComponentMetadata.InjectMethodMetadata
This class encapsulates metadata on an inject method, such as one annotated withInject
static class
ComponentMetadata.PrioritizedMethodMetadata
-
Field Summary
Fields Modifier and Type Field Description static ComponentMetadata.InjectMethodMetadata[]
EMPTY_INJECT_METHODS
static ComponentMetadata.PrioritizedMethodMetadata[]
EMPTY_PRIORITIZED_METHODS
-
Constructor Summary
Constructors Constructor Description ComponentMetadata(Class<?> component, List<Field> injectFields, List<Method> injectMethods, List<Method> startMethods, List<Method> postStartMethods, List<Method> stopMethods, boolean global, boolean survivesRestarts)
ComponentMetadata(Class<?> component, List<Field> injectFields, List<Method> injectMethods, List<Method> startMethods, List<Method> postStartMethods, List<Method> stopMethods, Scopes scope, boolean survivesRestarts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
extractDependencyType(Type erasedType, Type genericType, boolean lazy)
Class<?>
getClazz()
Map<String,String>
getDependencies()
ComponentMetadata.InjectFieldMetadata[]
getInjectFields()
ComponentMetadata.InjectMethodMetadata[]
getInjectMethods()
String
getName()
ComponentMetadata.PrioritizedMethodMetadata[]
getPostStartMethods()
Scopes
getScope()
ComponentMetadata.PrioritizedMethodMetadata[]
getStartMethods()
ComponentMetadata.PrioritizedMethodMetadata[]
getStopMethods()
boolean
isGlobalScope()
boolean
isManageable()
boolean
isSurvivesRestarts()
ManageableComponentMetadata
toManageableComponentMetadata()
String
toString()
-
-
-
Field Detail
-
EMPTY_INJECT_METHODS
public static final ComponentMetadata.InjectMethodMetadata[] EMPTY_INJECT_METHODS
-
EMPTY_PRIORITIZED_METHODS
public static final ComponentMetadata.PrioritizedMethodMetadata[] EMPTY_PRIORITIZED_METHODS
-
-
Method Detail
-
extractDependencyType
public String extractDependencyType(Type erasedType, Type genericType, boolean lazy)
-
getName
public String getName()
-
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 Class<?> getClazz()
-
toManageableComponentMetadata
public ManageableComponentMetadata toManageableComponentMetadata()
-
getScope
public Scopes getScope()
-
-