public class GridResourceProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
GridResourceProcessor(GridKernalContext ctx)
Creates resources processor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(IgniteSpi spi)
Cleans up resources from given SPI implementation.
|
void |
cleanup(LifecycleBean lifecycleBean)
Cleans up resources from given lifecycle beans.
|
void |
cleanup(Service svc)
Cleans up resources from given service.
|
void |
cleanupGeneric(Object obj) |
void |
inject(GridDeployment dep,
Class<?> taskCls,
ComputeJob job,
ComputeTaskSession ses,
GridJobContextImpl jobCtx)
Injects held resources into given
job. |
void |
inject(GridDeployment dep,
Class<?> depCls,
Object target)
Injects resources into generic class.
|
void |
inject(GridDeployment dep,
ComputeTask<?,?> task,
GridTaskSessionImpl ses,
ComputeLoadBalancer balancer,
ComputeTaskContinuousMapper mapper)
Injects held resources into given grid task.
|
void |
inject(IgniteSpi spi)
Injects held resources into given SPI implementation.
|
void |
inject(LifecycleBean lifecycleBean)
Injects held resources into given lifecycle bean.
|
void |
inject(Object obj,
GridResourceIoc.AnnotationSet annSet,
Object... params) |
void |
inject(Service svc)
Injects resources into service.
|
void |
injectBasicResource(Object target,
Class<? extends Annotation> annCls,
Object rsrc)
This method is declared public as it is used from tests as well.
|
void |
injectCacheName(Object obj,
String cacheName)
Injects cache name into given object.
|
void |
injectGeneric(Object obj) |
boolean |
injectStoreSession(Object obj,
CacheStoreSession ses)
Injects cache store session into given object.
|
void |
invokeAnnotated(GridDeployment dep,
Object target,
Class<? extends Annotation> annCls) |
boolean |
isAnnotationPresent(GridDeployment dep,
Object target,
Class<? extends Annotation> annCls)
Checks if annotation presents in specified object.
|
boolean |
isAnnotationsPresent(GridDeployment dep,
Object target,
GridResourceIoc.AnnotationSet annSet)
Checks if annotations presents in specified object.
|
void |
onKernalStart(boolean active)
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onUndeployed(GridDeployment dep)
Callback to be called when class loader is undeployed.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
<T> T |
resolve(T instance)
Delegates resource resolving to the provided dependency resolver, which wraps passed instance if necessary.
|
void |
setSpringContext(@Nullable GridSpringResourceContext rsrcCtx)
Sets Spring resource context.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStop, onReconnected, toString, validateNode, validateNodepublic GridResourceProcessor(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStart(boolean active)
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapteractive - Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException - Thrown in case of any errors.public void stop(boolean cancel)
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.public void setSpringContext(@Nullable
@Nullable GridSpringResourceContext rsrcCtx)
rsrcCtx - Spring resource context.public void onUndeployed(GridDeployment dep)
dep - Deployment to release resources for.public void invokeAnnotated(GridDeployment dep, Object target, Class<? extends Annotation> annCls) throws IgniteCheckedException
dep - Deployment.target - Target object.annCls - Annotation class.IgniteCheckedException - If failed to execute annotated methods.public void inject(GridDeployment dep, Class<?> depCls, Object target) throws IgniteCheckedException
dep - Deployment.depCls - Deployed class.target - Target instance to inject into.IgniteCheckedException - Thrown in case of any errors.public void injectCacheName(Object obj, String cacheName) throws IgniteCheckedException
obj - Object.cacheName - Cache name to inject.IgniteCheckedException - If failed to inject.public boolean injectStoreSession(Object obj, CacheStoreSession ses) throws IgniteCheckedException
obj - Object.ses - Session to inject.True if session was injected.IgniteCheckedException - If failed to inject.public void injectGeneric(Object obj) throws IgniteCheckedException
obj - Object to inject.IgniteCheckedException - If failed to inject.public void inject(Object obj, GridResourceIoc.AnnotationSet annSet, Object... params) throws IgniteCheckedException
obj - Object to inject.annSet - Supported annotations.params - Parameters.IgniteCheckedException - If failed to inject.public void cleanupGeneric(Object obj) throws IgniteCheckedException
obj - Object.IgniteCheckedException - If failed.public void inject(GridDeployment dep, Class<?> taskCls, ComputeJob job, ComputeTaskSession ses, GridJobContextImpl jobCtx) throws IgniteCheckedException
job.dep - Deployment.taskCls - Task class.job - Grid job to inject resources to.ses - Current task session.jobCtx - Job context.IgniteCheckedException - Thrown in case of any errors.public void inject(GridDeployment dep, ComputeTask<?,?> task, GridTaskSessionImpl ses, ComputeLoadBalancer balancer, ComputeTaskContinuousMapper mapper) throws IgniteCheckedException
dep - Deployed class.task - Grid task.ses - Grid task session.balancer - Load balancer.mapper - Continuous task mapper.IgniteCheckedException - Thrown in case of any errors.public boolean isAnnotationPresent(GridDeployment dep, Object target, Class<? extends Annotation> annCls)
dep - Class deployment.target - Object to check.annCls - Annotation to find.true if annotation is presented, false otherwise.public boolean isAnnotationsPresent(GridDeployment dep, Object target, GridResourceIoc.AnnotationSet annSet)
dep - Class deployment.target - Object to check.annSet - Annotations to find.true if any annotation is presented, false if it's not.public void inject(IgniteSpi spi) throws IgniteCheckedException
spi - SPI implementation.IgniteCheckedException - Throw in case of any errors.public void cleanup(IgniteSpi spi) throws IgniteCheckedException
nulls into SPI implementation.spi - SPI implementation.IgniteCheckedException - Thrown in case of any errors.public void inject(LifecycleBean lifecycleBean) throws IgniteCheckedException
lifecycleBean - Lifecycle bean.IgniteCheckedException - Thrown in case of any errors.public void cleanup(LifecycleBean lifecycleBean) throws IgniteCheckedException
nulls into lifecycle bean.lifecycleBean - Lifecycle bean.IgniteCheckedException - Thrown in case of any errors.public void inject(Service svc) throws IgniteCheckedException
svc - Service to inject.IgniteCheckedException - If failed.public void cleanup(Service svc) throws IgniteCheckedException
nulls into service bean.svc - Service.IgniteCheckedException - Thrown in case of any errors.public void injectBasicResource(Object target, Class<? extends Annotation> annCls, Object rsrc) throws IgniteCheckedException
unwrapTarget(Object)).target - Target object.annCls - Setter annotation.rsrc - Resource to inject.IgniteCheckedException - If injection failed.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapterpublic <T> T resolve(T instance)
instance - Instance of delegated class.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021