public abstract class ResourceCapableCacheDataImporterExporter extends AbstractCacheDataImporterExporter implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
AbstractCacheDataImporterExporter extension and implementation capable of handling and managing import
and export Resources.File,
GemFireCache,
Region,
InitializingBean,
ApplicationContext,
ConfigurableApplicationContext,
ResourceLoaderAware,
Expression,
ExpressionParser,
SpelParserConfiguration,
SpelExpressionParser,
Resource,
ResourceLoader,
ResourceReader,
ResourceResolver,
ResourceWriter,
AbstractCacheDataImporterExporter| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CACHE_DATA_EXPORT_RESOURCE_LOCATION_PROPERTY_NAME |
protected static java.lang.String |
CACHE_DATA_IMPORT_RESOURCE_LOCATION_PROPERTY_NAME |
protected static java.lang.String |
RESOURCE_NAME_PATTERN |
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 and Description |
|---|
ResourceCapableCacheDataImporterExporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Initializes the export and import
ResourceResolvers as needed along with
the reader and writer for the Resource
used on import and export. |
protected ResourceCapableCacheDataImporterExporter.ExportResourceResolver |
getExportResourceResolver()
Gets the configured reference to the
ResourceCapableCacheDataImporterExporter.ExportResourceResolver. |
protected ResourceCapableCacheDataImporterExporter.ImportResourceResolver |
getImportResourceResolver()
Gets the configured reference to the
ResourceCapableCacheDataImporterExporter.ImportResourceResolver. |
protected java.util.Optional<org.springframework.core.io.ResourceLoader> |
getResourceLoader()
Returns an
Optional reference to the configured ResourceLoader
used to load Resources. |
protected ResourceReader |
getResourceReader()
Gets the configured
ResourceReader used to read data from a Resource on import. |
protected ResourceWriter |
getResourceWriter()
Gets the configured
ResourceWriter used to write data to the Resource on export. |
void |
setExportResourceResolver(ResourceCapableCacheDataImporterExporter.ExportResourceResolver exportResourceResolver)
Sets a reference to the configured
ResourceCapableCacheDataImporterExporter.ExportResourceResolver. |
void |
setImportResourceResolver(ResourceCapableCacheDataImporterExporter.ImportResourceResolver importResourceResolver)
Sets a reference to the configured
ResourceCapableCacheDataImporterExporter.ImportResourceResolver. |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
|
void |
setResourceReader(ResourceReader resourceReader)
Sets a reference to the configured
ResourceReader. |
void |
setResourceWriter(ResourceWriter resourceWriter)
Set a reference to the configured
ResourceWriter. |
doExportFrom, doImportInto, exportFrom, getApplicationContext, getEnvironment, getLogger, getRegionPredicate, importInto, isExportEnabled, isImportEnabled, isImportProfilesActive, requireApplicationContext, requireEnvironment, setApplicationContext, setEnvironmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostProcessBeforeDestructionrequiresDestructionpostProcessAfterInitialization, postProcessBeforeInitializationpostProcessAfterInitializationprotected static final java.lang.String CACHE_DATA_EXPORT_RESOURCE_LOCATION_PROPERTY_NAME
protected static final java.lang.String CACHE_DATA_IMPORT_RESOURCE_LOCATION_PROPERTY_NAME
protected static final java.lang.String RESOURCE_NAME_PATTERN
public ResourceCapableCacheDataImporterExporter()
public void afterPropertiesSet()
ResourceResolvers as needed along with
the reader and writer for the Resource
used on import and export.afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean@Autowired(required=false)
public void setExportResourceResolver(@Nullable
ResourceCapableCacheDataImporterExporter.ExportResourceResolver exportResourceResolver)
ResourceCapableCacheDataImporterExporter.ExportResourceResolver.exportResourceResolver - configured ResourceCapableCacheDataImporterExporter.ExportResourceResolver used by this importer/exporter
to resolve Resources on export.ResourceCapableCacheDataImporterExporter.ExportResourceResolver@NonNull protected ResourceCapableCacheDataImporterExporter.ExportResourceResolver getExportResourceResolver()
ResourceCapableCacheDataImporterExporter.ExportResourceResolver.
The configured ResourceCapableCacheDataImporterExporter.ExportResourceResolver is guaranteed to be non-null only if the
afterPropertiesSet() initialization method was called after construction of this importer/exporter.
This is definitely true in a Spring context.ResourceCapableCacheDataImporterExporter.ExportResourceResolver.ResourceCapableCacheDataImporterExporter.ExportResourceResolver@Autowired(required=false)
public void setImportResourceResolver(@Nullable
ResourceCapableCacheDataImporterExporter.ImportResourceResolver importResourceResolver)
ResourceCapableCacheDataImporterExporter.ImportResourceResolver.importResourceResolver - configured ResourceCapableCacheDataImporterExporter.ImportResourceResolver used by this importer/exporter
to resolve Resources on import.ResourceCapableCacheDataImporterExporter.ImportResourceResolver@NonNull protected ResourceCapableCacheDataImporterExporter.ImportResourceResolver getImportResourceResolver()
ResourceCapableCacheDataImporterExporter.ImportResourceResolver.
The configured ResourceCapableCacheDataImporterExporter.ImportResourceResolver is guaranteed to be non-null only if the
afterPropertiesSet() initialization method was called after construction of this importer/exporter.
This is definitely true in a Spring context.ResourceCapableCacheDataImporterExporter.ImportResourceResolver.ResourceCapableCacheDataImporterExporter.ImportResourceResolverpublic void setResourceLoader(@Nullable
org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwareresourceLoader - ResourceLoader used to resolve and load Resources.ResourceLoaderprotected java.util.Optional<org.springframework.core.io.ResourceLoader> getResourceLoader()
Optional reference to the configured ResourceLoader
used to load Resources.Optional reference to the configured ResourceLoader.ResourceLoader,
Optional@Autowired(required=false)
public void setResourceReader(@Nullable
ResourceReader resourceReader)
ResourceReader.resourceReader - configured ResourceReader used by this importer/exporter
to read from a Resource on import.ResourceReader@NonNull protected ResourceReader getResourceReader()
ResourceReader used to read data from a Resource on import.
The configured ResourceReader is guaranteed to be non-null only if the
afterPropertiesSet() initialization method was called after construction of this importer/exporter.
This is definitely true in a Spring context.ResourceReader.ResourceReader@Autowired(required=false)
public void setResourceWriter(@Nullable
ResourceWriter resourceWriter)
ResourceWriter.resourceWriter - configured ResourceWriter used by this importer/exporter
to write to a Resource on export.ResourceWriter@NonNull protected ResourceWriter getResourceWriter()
ResourceWriter used to write data to the Resource on export.
The configured ResourceWriter is guaranteed to be non-null only if the
afterPropertiesSet() initialization method was called after construction of this importer/exporter.
This is definitely true in a Spring context.ResourceWriter.ResourceWriter