Class ResourceCapableCacheDataImporterExporter
java.lang.Object
org.springframework.geode.data.AbstractCacheDataImporterExporter
org.springframework.geode.data.support.ResourceCapableCacheDataImporterExporter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.config.BeanPostProcessor,org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.EnvironmentAware,org.springframework.context.ResourceLoaderAware,CacheDataExporter,CacheDataImporter,CacheDataImporterExporter
- Direct Known Subclasses:
JsonCacheDataImporterExporter
public abstract class ResourceCapableCacheDataImporterExporter
extends AbstractCacheDataImporterExporter
implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
An
AbstractCacheDataImporterExporter extension and implementation capable of handling and managing import
and export Resources.- Since:
- 1.3.1
- See Also:
-
FileGemFireCacheRegionInitializingBeanApplicationContextConfigurableApplicationContextResourceLoaderAwareExpressionExpressionParserSpelParserConfigurationSpelExpressionParserResourceResourceLoaderResourceReaderResourceResolverResourceWriterAbstractCacheDataImporterExporter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstract base class containing functionality common to allcachebasedResourceResolvers, whether for import or export.static classAbstract base class extended by exportResourceCapableCacheDataImporterExporter.CacheResourceResolverimplementations, providing a template to resolve theResourceused for export.static classAbstract base class extended by importResourceResolverimplementations, providing a template to resolve theResourceto import.protected static interfacestatic classResolves theResourceto import from the classpath.static interfaceMarker interface extendingResourceCapableCacheDataImporterExporter.CacheResourceResolverfor cache data exports.static classResolves theResourceused for export from the filesystem.static interfaceMarker interface extendingResourceCapableCacheDataImporterExporter.CacheResourceResolverfor cache data imports. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class org.springframework.geode.data.AbstractCacheDataImporterExporter
CACHE_DATA_EXPORT_ENABLED_PROPERTY_NAME, CACHE_DATA_IMPORT_ACTIVE_PROFILES_PROPERTY_NAME, CACHE_DATA_IMPORT_ENABLED_PROPERTY_NAME, DEFAULT_CACHE_DATA_EXPORT_ENABLED, DEFAULT_CACHE_DATA_IMPORT_ACTIVE_PROFILES, DEFAULT_CACHE_DATA_IMPORT_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitializes the export and importResourceResolversas needed along with thereaderandwriterfor theResourceused on import and export.Gets the configured reference to theResourceCapableCacheDataImporterExporter.ExportResourceResolver.Gets the configured reference to theResourceCapableCacheDataImporterExporter.ImportResourceResolver.protected Optional<org.springframework.core.io.ResourceLoader>protected ResourceReaderGets the configuredResourceReaderused to read data from aResourceon import.protected ResourceWriterGets the configuredResourceWriterused to write data to theResourceon export.voidsetExportResourceResolver(ResourceCapableCacheDataImporterExporter.ExportResourceResolver exportResourceResolver) Sets a reference to the configuredResourceCapableCacheDataImporterExporter.ExportResourceResolver.voidsetImportResourceResolver(ResourceCapableCacheDataImporterExporter.ImportResourceResolver importResourceResolver) Sets a reference to the configuredResourceCapableCacheDataImporterExporter.ImportResourceResolver.voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) voidsetResourceReader(ResourceReader resourceReader) Sets a reference to the configuredResourceReader.voidsetResourceWriter(ResourceWriter resourceWriter) Set a reference to the configuredResourceWriter.Methods inherited from class org.springframework.geode.data.AbstractCacheDataImporterExporter
doExportFrom, doImportInto, exportFrom, getApplicationContext, getEnvironment, getLogger, getRegionPredicate, importInto, isExportEnabled, isImportEnabled, isImportProfilesActive, requireApplicationContext, requireEnvironment, setApplicationContext, setEnvironmentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitializationMethods inherited from interface org.springframework.geode.data.CacheDataExporter
postProcessBeforeDestructionMethods inherited from interface org.springframework.geode.data.CacheDataImporter
postProcessAfterInitializationMethods inherited from interface org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor
requiresDestruction
-
Field Details
-
CACHE_DATA_EXPORT_RESOURCE_LOCATION_PROPERTY_NAME
- See Also:
-
CACHE_DATA_IMPORT_RESOURCE_LOCATION_PROPERTY_NAME
- See Also:
-
RESOURCE_NAME_PATTERN
- See Also:
-
-
Constructor Details
-
ResourceCapableCacheDataImporterExporter
public ResourceCapableCacheDataImporterExporter()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()Initializes the export and importResourceResolversas needed along with thereaderandwriterfor theResourceused on import and export.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
setExportResourceResolver
@Autowired(required=false) public void setExportResourceResolver(@Nullable ResourceCapableCacheDataImporterExporter.ExportResourceResolver exportResourceResolver) Sets a reference to the configuredResourceCapableCacheDataImporterExporter.ExportResourceResolver.- Parameters:
exportResourceResolver- configuredResourceCapableCacheDataImporterExporter.ExportResourceResolverused by this importer/exporter to resolveResourceson export.- See Also:
-
getExportResourceResolver
@NonNull protected ResourceCapableCacheDataImporterExporter.ExportResourceResolver getExportResourceResolver()Gets the configured reference to theResourceCapableCacheDataImporterExporter.ExportResourceResolver. The configuredResourceCapableCacheDataImporterExporter.ExportResourceResolveris guaranteed to be non-null only if theafterPropertiesSet()initialization method was called after construction of this importer/exporter. This is definitely true in a Spring context.- Returns:
- the configured reference to the
ResourceCapableCacheDataImporterExporter.ExportResourceResolver. - See Also:
-
setImportResourceResolver
@Autowired(required=false) public void setImportResourceResolver(@Nullable ResourceCapableCacheDataImporterExporter.ImportResourceResolver importResourceResolver) Sets a reference to the configuredResourceCapableCacheDataImporterExporter.ImportResourceResolver.- Parameters:
importResourceResolver- configuredResourceCapableCacheDataImporterExporter.ImportResourceResolverused by this importer/exporter to resolveResourceson import.- See Also:
-
getImportResourceResolver
@NonNull protected ResourceCapableCacheDataImporterExporter.ImportResourceResolver getImportResourceResolver()Gets the configured reference to theResourceCapableCacheDataImporterExporter.ImportResourceResolver. The configuredResourceCapableCacheDataImporterExporter.ImportResourceResolveris guaranteed to be non-null only if theafterPropertiesSet()initialization method was called after construction of this importer/exporter. This is definitely true in a Spring context.- Returns:
- the configured reference to the
ResourceCapableCacheDataImporterExporter.ImportResourceResolver. - See Also:
-
setResourceLoader
public void setResourceLoader(@Nullable org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
setResourceLoaderin interfaceorg.springframework.context.ResourceLoaderAware- Parameters:
resourceLoader-ResourceLoaderused to resolve and loadResources.- See Also:
-
ResourceLoader
-
getResourceLoader
-
setResourceReader
Sets a reference to the configuredResourceReader.- Parameters:
resourceReader- configuredResourceReaderused by this importer/exporter to read from aResourceon import.- See Also:
-
getResourceReader
Gets the configuredResourceReaderused to read data from aResourceon import. The configuredResourceReaderis guaranteed to be non-null only if theafterPropertiesSet()initialization method was called after construction of this importer/exporter. This is definitely true in a Spring context.- Returns:
- the configured
ResourceReader. - See Also:
-
setResourceWriter
Set a reference to the configuredResourceWriter.- Parameters:
resourceWriter- configuredResourceWriterused by this importer/exporter to write to aResourceon export.- See Also:
-
getResourceWriter
Gets the configuredResourceWriterused to write data to theResourceon export. The configuredResourceWriteris guaranteed to be non-null only if theafterPropertiesSet()initialization method was called after construction of this importer/exporter. This is definitely true in a Spring context.- Returns:
- the configured
ResourceWriter. - See Also:
-