public class RepositoryCacheWriter<T,ID> extends RepositoryCacheLoaderWriterSupport<T,ID>
CacheWriter
implementation backed by a Spring Data CrudRepository
used to persist a cache entry
(i.e. entity) to a backend, external data source.CacheWriter
,
CrudRepository
,
RepositoryCacheLoaderWriterSupport
DATA_ACCESS_ERROR, NUKE_AND_PAVE_PROPERTY
Constructor and Description |
---|
RepositoryCacheWriter(org.springframework.data.repository.CrudRepository<T,ID> repository) |
Modifier and Type | Method and Description |
---|---|
void |
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(java.util.function.Supplier<java.lang.String> messageSupplier,
java.lang.Throwable cause) |
doRepositoryOp, getEnvironment, getRepository, isNukeAndPaveEnabled, load, setEnvironment, with
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public void beforeCreate(org.apache.geode.cache.EntryEvent<ID,T> event) throws org.apache.geode.cache.CacheWriterException
org.apache.geode.cache.CacheWriterException
public void beforeUpdate(org.apache.geode.cache.EntryEvent<ID,T> event) throws org.apache.geode.cache.CacheWriterException
org.apache.geode.cache.CacheWriterException
public void beforeDestroy(org.apache.geode.cache.EntryEvent<ID,T> event) throws org.apache.geode.cache.CacheWriterException
org.apache.geode.cache.CacheWriterException
public void beforeRegionClear(org.apache.geode.cache.RegionEvent<ID,T> event) throws org.apache.geode.cache.CacheWriterException
org.apache.geode.cache.CacheWriterException
public void beforeRegionDestroy(org.apache.geode.cache.RegionEvent<ID,T> event) throws org.apache.geode.cache.CacheWriterException
org.apache.geode.cache.CacheWriterException
protected org.apache.geode.cache.CacheRuntimeException newCacheRuntimeException(java.util.function.Supplier<java.lang.String> messageSupplier, java.lang.Throwable cause)
newCacheRuntimeException
in class RepositoryCacheLoaderWriterSupport<T,ID>