/** * Flushes the bean cache. The cache remains available for the rest of the request. */ public static void invalidate() { if (isActive()) { endRequest(); beginRequest(); } }
private Stack(ThreadLocal<Stack> interceptionContexts) { this.interceptionContexts = interceptionContexts; this.elements = new ArrayDeque<CombinedInterceptorAndDecoratorStackMethodHandler>(); /* * Setting / removing of a thread-local is much more expensive compared to get. Therefore, * if RequestScopedCache is active we register the thread-local for removal at the end of the * request. This yields possitive results only if the number of intercepted invocations is large. * If it is not, the performance characteristics are similar to explicitly removing the thread-local * once the stack gets empty. */ this.removeWhenEmpty = !RequestScopedCache.addItemIfActive(this); this.valid = true; }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }
@Override public void deactivate() { try { RequestScopedCache.endRequest(); } finally { super.deactivate(); } }
/** * Flushes the bean cache. The cache remains available for the rest of the request. */ public static void invalidate() { if (isActive()) { endRequest(); beginRequest(); } }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }
@Override public void deactivate() { try { RequestScopedCache.endRequest(); } finally { super.deactivate(); } } }
private Stack(ThreadLocal<Stack<T>> interceptionContexts) { this.interceptionContexts = interceptionContexts; this.elements = new ArrayDeque<T>(); /* * Setting / removing of a thread-local is much more expensive compared to get. Therefore, * if RequestScopedCache is active we register the thread-local for removal at the end of the * request. This yields possitive results only if the number of intercepted invocations is large. * If it is not, the performance characteristics are similar to explicitly removing the thread-local * once the stack gets empty. */ this.removeWhenEmpty = !RequestScopedCache.addItemIfActive(this); this.valid = true; }
/** * Flushes the bean cache. The cache remains available for the rest of the request. */ public static void invalidate() { if (isActive()) { endRequest(); beginRequest(); } }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }
@Override public void deactivate() { try { RequestScopedCache.endRequest(); } finally { super.deactivate(); } }
/** * Flushes the bean cache. The cache remains available for the rest of the request. */ public static void invalidate() { if (isActive()) { endRequest(); beginRequest(); } }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }
@Override public void deactivate() { try { RequestScopedCache.endRequest(); } finally { super.deactivate(); } }
/** * Flushes the bean cache. The cache remains available for the rest of the request. */ public static void invalidate() { if (isActive()) { endRequest(); beginRequest(); } }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }
@Override public void deactivate() { try { RequestScopedCache.endRequest(); } finally { super.deactivate(); } }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }
@Override public void deactivate() { try { RequestScopedCache.endRequest(); } finally { super.deactivate(); } }
@Override public void activate() { super.activate(); RequestScopedCache.beginRequest(); }