use of org.apache.deltaspike.core.spi.activation.Deactivatable in project deltaspike by apache.
the class ClassDeactivationUtils method performProjectStageDependentCleanup.
private static void performProjectStageDependentCleanup() {
ProjectStage currentProjectStage = ProjectStageProducer.getInstance().getProjectStage();
if (previouslyDetectedProjectStage != currentProjectStage) {
previouslyDetectedProjectStage = currentProjectStage;
//don't use #clear to support parallel access to #isActivated (+ reset) without synchronization
activationStatusCache = new ConcurrentHashMap<Class<? extends Deactivatable>, Boolean>();
//#clear is ok here due to the handling in the synchronized method #initDeactivatableCacheFor
classDeactivatorMap.clear();
} else if (currentProjectStage == ProjectStage.UnitTest || currentProjectStage == ProjectStage.Development) {
activationStatusCache = new ConcurrentHashMap<Class<? extends Deactivatable>, Boolean>();
}
}
Aggregations