use of org.apache.ignite.events.DeploymentEvent in project ignite by apache.
the class GridDeploymentLocalStore method recordUndeploy.
/**
* Records undeploy event.
*
* @param dep Undeployed class loader.
*/
private void recordUndeploy(GridDeployment dep) {
assert dep.undeployed();
if (ctx.event().isRecordable(EVT_TASK_UNDEPLOYED) || ctx.event().isRecordable(EVT_CLASS_UNDEPLOYED)) {
for (Class<?> cls : dep.deployedClasses()) {
boolean isTask = isTask(cls);
String msg = isTask ? "Task locally undeployed: " + cls : "Class locally undeployed: " + cls;
if (ctx.event().isRecordable(isTask ? EVT_TASK_UNDEPLOYED : EVT_CLASS_UNDEPLOYED)) {
DeploymentEvent evt = new DeploymentEvent();
evt.message(msg);
evt.node(ctx.discovery().localNode());
evt.type(isTask ? EVT_TASK_UNDEPLOYED : EVT_CLASS_UNDEPLOYED);
evt.alias(getAlias(dep, cls));
ctx.event().record(evt);
}
if (log.isInfoEnabled())
log.info(msg);
}
}
}
Aggregations