public class ComponentMetadata extends Object implements Serializable
Scope
, SurvivesRestarts
,
DefaultFactoryFor
, ComponentName
, Inject
, Start
and Stop
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 of ComponentMetadata
objects are created and persisted in the
Infinispan jar.
This metadata is then read in by the ComponentMetadataRepo
at runtime, and used by the ComponentRegistry
and other factory-like classes to bootstrap an Infinispan node.
Also see ManageableComponentMetadata
for components that also expose JMX information.ManageableComponentMetadata
,
ComponentMetadataRepo
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ComponentMetadata.InjectMetadata
This class encapsulates metadata on an inject method, such as one annotated with
Inject |
static class |
ComponentMetadata.PrioritizedMethodMetadata
This class encapsulates metadata on a prioritized method, such as one annotated with
Start or @Stop |
Modifier and Type | Field and Description |
---|---|
static ComponentMetadata.InjectMetadata[] |
EMPTY_INJECT_METHODS |
static ComponentMetadata.PrioritizedMethodMetadata[] |
EMPTY_PRIORITIZED_METHODS |
Constructor and Description |
---|
ComponentMetadata(Class<?> component,
List<Method> injectMethods,
List<Method> startMethods,
List<Method> stopMethods,
boolean global,
boolean survivesRestarts) |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getClazz() |
Map<String,String> |
getDependencies() |
ComponentMetadata.InjectMetadata[] |
getInjectMethods() |
String |
getName() |
ComponentMetadata.PrioritizedMethodMetadata[] |
getStartMethods() |
ComponentMetadata.PrioritizedMethodMetadata[] |
getStopMethods() |
boolean |
isGlobalScope() |
boolean |
isManageable() |
boolean |
isSurvivesRestarts() |
ManageableComponentMetadata |
toManageableComponentMetadata() |
String |
toString() |
public static final ComponentMetadata.InjectMetadata[] EMPTY_INJECT_METHODS
public static final ComponentMetadata.PrioritizedMethodMetadata[] EMPTY_PRIORITIZED_METHODS
public String getName()
public ComponentMetadata.InjectMetadata[] getInjectMethods()
public ComponentMetadata.PrioritizedMethodMetadata[] getStartMethods()
public ComponentMetadata.PrioritizedMethodMetadata[] getStopMethods()
public boolean isGlobalScope()
public boolean isSurvivesRestarts()
public boolean isManageable()
public Class<?> getClazz()
public ManageableComponentMetadata toManageableComponentMetadata()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.