/* package */ Context<?> resolveContext(Class<? extends Annotation> scope) throws IllegalStateException { if (scope.equals(Singleton.class)) return singletonContext; if (scope.equals(PerLookup.class)) return perLookupContext; Context<?> retVal = contextCache.compute(scope); if (retVal.isActive()) return retVal; // Not active anymore, maybe there is another. But first, clear the cache! contextCache.remove(scope); return contextCache.compute(scope); }
/* package */ Context<?> resolveContext(Class<? extends Annotation> scope) throws IllegalStateException { if (scope.equals(Singleton.class)) return singletonContext; if (scope.equals(PerLookup.class)) return perLookupContext; Context<?> retVal = contextCache.compute(scope); if (retVal.isActive()) return retVal; // Not active anymore, maybe there is another. But first, clear the cache! contextCache.remove(scope); return contextCache.compute(scope); }
/* package */ Context<?> resolveContext(Class<? extends Annotation> scope) throws IllegalStateException { if (scope.equals(Singleton.class)) return singletonContext; if (scope.equals(PerLookup.class)) return perLookupContext; Context<?> retVal = contextCache.compute(scope); if (retVal.isActive()) return retVal; // Not active anymore, maybe there is another. But first, clear the cache! contextCache.remove(scope); return contextCache.compute(scope); }
/* package */ Context<?> resolveContext(Class<? extends Annotation> scope) throws IllegalStateException { if (scope.equals(Singleton.class)) return singletonContext; if (scope.equals(PerLookup.class)) return perLookupContext; Context<?> retVal = contextCache.compute(scope); if (retVal.isActive()) return retVal; // Not active anymore, maybe there is another. But first, clear the cache! contextCache.remove(scope); return contextCache.compute(scope); }
/** * Release one system descriptor * * @param one The descriptor to release (may not be null). Further, the cache MUST be set */ @SuppressWarnings("unchecked") @Override public void destroyOne(ActiveDescriptor<?> one) { Object value; valueCache.remove(new ContextualInput<Object>((ActiveDescriptor<Object>) one, null)); value = one.getCache(); one.releaseCache(); if (value == null) return; try { ((ActiveDescriptor<Object>) one).dispose(value); } catch (Throwable th) { Logger.getLogger().debug("SingletonContext", "releaseOne", th); } }
/** * Release one system descriptor * * @param one The descriptor to release (may not be null). Further, the cache MUST be set */ @SuppressWarnings("unchecked") @Override public void destroyOne(ActiveDescriptor<?> one) { Object value; valueCache.remove(new ContextualInput<Object>((ActiveDescriptor<Object>) one, null)); value = one.getCache(); one.releaseCache(); if (value == null) return; try { ((ActiveDescriptor<Object>) one).dispose(value); } catch (Throwable th) { Logger.getLogger().debug("SingletonContext", "releaseOne", th); } }
/** * Release one system descriptor * * @param one The descriptor to release (may not be null). Further, the cache MUST be set */ @SuppressWarnings("unchecked") @Override public void destroyOne(ActiveDescriptor<?> one) { Object value; valueCache.remove(new ContextualInput<Object>((ActiveDescriptor<Object>) one, null)); value = one.getCache(); one.releaseCache(); if (value == null) return; try { ((ActiveDescriptor<Object>) one).dispose(value); } catch (Throwable th) { Logger.getLogger().debug("SingletonContext", "releaseOne", th); } }
/** * Release one system descriptor * * @param one The descriptor to release (may not be null). Further, the cache MUST be set */ @SuppressWarnings("unchecked") @Override public void destroyOne(ActiveDescriptor<?> one) { Object value; valueCache.remove(new ContextualInput<Object>((ActiveDescriptor<Object>) one, null)); value = one.getCache(); one.releaseCache(); if (value == null) return; try { ((ActiveDescriptor<Object>) one).dispose(value); } catch (Throwable th) { Logger.getLogger().debug("SingletonContext", "releaseOne", th); } }
for (Injectee injectee : unbind.getInjectees()) { if (injectee instanceof SystemInjecteeImpl) { injecteeToResolverCache.remove((SystemInjecteeImpl) injectee);
for (Injectee injectee : unbind.getInjectees()) { if (injectee instanceof SystemInjecteeImpl) { injecteeToResolverCache.remove((SystemInjecteeImpl) injectee);
for (Injectee injectee : unbind.getInjectees()) { if (injectee instanceof SystemInjecteeImpl) { injecteeToResolverCache.remove((SystemInjecteeImpl) injectee);
for (Injectee injectee : unbind.getInjectees()) { if (injectee instanceof SystemInjecteeImpl) { injecteeToResolverCache.remove((SystemInjecteeImpl) injectee);