/** * Clear the local metadata cache, if any, removing all cached class metadata. */ public void clearCache() { if (this.metadataReaderFactory instanceof CachingMetadataReaderFactory) { // Clear cache in externally provided MetadataReaderFactory; this is a no-op // for a shared cache since it'll be cleared by the ApplicationContext. ((CachingMetadataReaderFactory) this.metadataReaderFactory).clearCache(); } }
/** * Clear the local metadata cache, if any, removing all cached class metadata. */ public void clearCache() { if (this.metadataReaderFactory instanceof CachingMetadataReaderFactory) { // Clear cache in externally provided MetadataReaderFactory; this is a no-op // for a shared cache since it'll be cleared by the ApplicationContext. ((CachingMetadataReaderFactory) this.metadataReaderFactory).clearCache(); } }
((CachingMetadataReaderFactory) this.metadataReaderFactory).clearCache();
((CachingMetadataReaderFactory) this.metadataReaderFactory).clearCache();
public void clearCache() { if ( metadataReaderFactory instanceof CachingMetadataReaderFactory ) { ( (CachingMetadataReaderFactory) metadataReaderFactory ).clearCache(); } } }
/** * Clear the local metadata cache, if any, removing all cached class metadata. */ public void clearCache() { if (this.metadataReaderFactory instanceof CachingMetadataReaderFactory) { // Clear cache in externally provided MetadataReaderFactory; this is a no-op // for a shared cache since it'll be cleared by the ApplicationContext. ((CachingMetadataReaderFactory) this.metadataReaderFactory).clearCache(); } }
@TearDown(Level.Invocation) public void clear() { if (factory instanceof CachingMetadataReaderFactory) { ((CachingMetadataReaderFactory) factory).clearCache(); } if (factory instanceof ConcurrentReferenceCachingMetadataReaderFactory) { ((ConcurrentReferenceCachingMetadataReaderFactory) factory).clearCache(); } }
((CachingMetadataReaderFactory) this.metadataReaderFactory).clearCache();
@Override public void configure( AcrossContext context ) { if ( basePackage == null || baseModuleName == null ) { throw new AcrossConfigurationException( "Unable to add dynamic modules as no basePackage and no baseModuleName have been configured" ); } packageProvider = new ClassPathScanningChildPackageProvider( resourcePatternResolver, metadataReaderFactory ); String[] children = packageProvider.findChildren( basePackage ); // always add the application module configureApplicationModule( context, basePackage + ".application", baseModuleName ); if ( hasPackage( children, "infrastructure" ) ) { configureInfrastructureModule( context, basePackage + ".infrastructure", baseModuleName ); } if ( hasPackage( children, "postprocessor" ) ) { configurePostProcessorModule( context, basePackage + ".postprocessor", baseModuleName ); } if ( !metadataReaderFactoryConfigured && metadataReaderFactory instanceof CachingMetadataReaderFactory ) { ( (CachingMetadataReaderFactory) metadataReaderFactory ).clearCache(); } }