/** * A CacheInterceptor is an adaptor that when overridden and assigned to a Descriptor all interaction * between EclipseLink and the internal cache for that class will pass through the Interceptor. * Advanced users could use this interceptor to audit, profile or log cache access. This Interceptor * could also be used to redirect or augment the TopLink cache with an alternate cache mechanism. * EclipseLink's configurated IdentityMaps will be passed to the Interceptor constructor. * * As with IdentityMaps an entire class inheritance hierarchy will share the same interceptor. * @see org.eclipse.persistence.sessions.interceptors.CacheInterceptor */ public Class getCacheInterceptorClass() { return getCachePolicy().getCacheInterceptorClass(); }
/** * A CacheInterceptor is an adaptor that when overridden and assigned to a Descriptor all interaction * between EclipseLink and the internal cache for that class will pass through the Interceptor. * Advanced users could use this interceptor to audit, profile or log cache access. This Interceptor * could also be used to redirect or augment the TopLink cache with an alternate cache mechanism. * EclipseLink's configurated IdentityMaps will be passed to the Interceptor constructor. * * As with IdentityMaps an entire class inheritance hierarchy will share the same interceptor. * @see org.eclipse.persistence.sessions.interceptors.CacheInterceptor */ public Class getCacheInterceptorClass() { return getCachePolicy().getCacheInterceptorClass(); }
if (returnNullIfNoMap && descriptor.getCachePolicy().getCacheInterceptorClass() == null) {
if (returnNullIfNoMap && descriptor.getCachePolicy().getCacheInterceptorClass() == null) {
if ((descriptor == null) || (descriptor.getCachePolicy().getCacheInterceptorClass() == null)) { Constructor constructor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(identityMapClass, parameters, false)); IdentityMap map = (IdentityMap)AccessController.doPrivileged(new PrivilegedInvokeConstructor(constructor, values)); if ((descriptor != null) && (descriptor.getCachePolicy().getCacheInterceptorClass() != null)) { constructor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(descriptor.getCacheInterceptorClass(), new Class[] { IdentityMap.class, AbstractSession.class }, false)); Object params[] = new Object[]{map, this.session};
if ((descriptor == null) || (descriptor.getCachePolicy().getCacheInterceptorClass() == null)) { Constructor constructor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(identityMapClass, parameters, false)); IdentityMap map = (IdentityMap)AccessController.doPrivileged(new PrivilegedInvokeConstructor(constructor, values)); if ((descriptor != null) && (descriptor.getCachePolicy().getCacheInterceptorClass() != null)) { constructor = AccessController.doPrivileged(new PrivilegedGetConstructorFor(descriptor.getCacheInterceptorClass(), new Class[] { IdentityMap.class, AbstractSession.class }, false)); Object params[] = new Object[]{map, this.session};