Package org.springframework.geode.cache
Class RepositoryCacheWriter<T,ID>
java.lang.Object
org.springframework.geode.cache.support.RepositoryCacheLoaderWriterSupport<T,ID>
org.springframework.geode.cache.RepositoryCacheWriter<T,ID>
- All Implemented Interfaces:
org.apache.geode.cache.CacheCallback
,org.apache.geode.cache.CacheLoader<ID,
,T> org.apache.geode.cache.CacheWriter<ID,
,T> org.apache.geode.cache.Declarable
,org.springframework.beans.factory.Aware
,org.springframework.context.EnvironmentAware
,CacheLoaderSupport<ID,
,T> CacheWriterSupport<ID,
T>
A
CacheWriter
implementation backed by a Spring Data CrudRepository
used to persist a cache entry
(i.e. entity) to a backend, external data source.- Since:
- 1.1.0
- See Also:
-
CacheWriter
CrudRepository
RepositoryCacheLoaderWriterSupport
-
Field Summary
Fields inherited from class org.springframework.geode.cache.support.RepositoryCacheLoaderWriterSupport
DATA_ACCESS_ERROR, NUKE_AND_PAVE_PROPERTY
-
Constructor Summary
ConstructorDescriptionRepositoryCacheWriter
(org.springframework.data.repository.CrudRepository<T, ID> repository) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeCreate
(org.apache.geode.cache.EntryEvent<ID, T> event) void
beforeDestroy
(org.apache.geode.cache.EntryEvent<ID, T> event) void
beforeRegionClear
(org.apache.geode.cache.RegionEvent<ID, T> event) void
beforeRegionDestroy
(org.apache.geode.cache.RegionEvent<ID, T> event) void
beforeUpdate
(org.apache.geode.cache.EntryEvent<ID, T> event) protected org.apache.geode.cache.CacheRuntimeException
newCacheRuntimeException
(Supplier<String> messageSupplier, Throwable cause) Methods inherited from class org.springframework.geode.cache.support.RepositoryCacheLoaderWriterSupport
doRepositoryOp, getEnvironment, getRepository, isNukeAndPaveEnabled, load, setEnvironment, with
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.geode.cache.support.CacheLoaderSupport
close
Methods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
RepositoryCacheWriter
-
-
Method Details
-
beforeCreate
public void beforeCreate(org.apache.geode.cache.EntryEvent<ID, T> event) throws org.apache.geode.cache.CacheWriterException- Throws:
org.apache.geode.cache.CacheWriterException
-
beforeUpdate
public void beforeUpdate(org.apache.geode.cache.EntryEvent<ID, T> event) throws org.apache.geode.cache.CacheWriterException- Throws:
org.apache.geode.cache.CacheWriterException
-
beforeDestroy
public void beforeDestroy(org.apache.geode.cache.EntryEvent<ID, T> event) throws org.apache.geode.cache.CacheWriterException- Throws:
org.apache.geode.cache.CacheWriterException
-
beforeRegionClear
public void beforeRegionClear(org.apache.geode.cache.RegionEvent<ID, T> event) throws org.apache.geode.cache.CacheWriterException- Throws:
org.apache.geode.cache.CacheWriterException
-
beforeRegionDestroy
public void beforeRegionDestroy(org.apache.geode.cache.RegionEvent<ID, T> event) throws org.apache.geode.cache.CacheWriterException- Throws:
org.apache.geode.cache.CacheWriterException
-
newCacheRuntimeException
protected org.apache.geode.cache.CacheRuntimeException newCacheRuntimeException(Supplier<String> messageSupplier, Throwable cause) - Specified by:
newCacheRuntimeException
in classRepositoryCacheLoaderWriterSupport<T,
ID>
-