Interface JpaRepositoryCacheLoader<T,ID>
-
- Type Parameters:
T
- the domain type the repository manages and the type of values in the cacheID
- the type of the id of the entity the repository manages and the type of the cache key
- All Superinterfaces:
com.tangosol.net.cache.CacheLoader<ID,T>
,org.springframework.data.repository.CrudRepository<T,ID>
,org.springframework.data.jpa.repository.JpaRepository<T,ID>
,org.springframework.data.repository.PagingAndSortingRepository<T,ID>
,org.springframework.data.repository.query.QueryByExampleExecutor<T>
,org.springframework.data.repository.Repository<T,ID>
- All Known Subinterfaces:
JpaRepositoryCacheStore<T,ID>
@NoRepositoryBean public interface JpaRepositoryCacheLoader<T,ID> extends org.springframework.data.jpa.repository.JpaRepository<T,ID>, com.tangosol.net.cache.CacheLoader<ID,T>
A CoherenceCacheLoader
that is also aJpaRepository
allowing the loader methods to use the repository to load data.- Since:
- 3.0
- Author:
- Jonathan Knight 2021.08.17
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ID
getId(T value)
Returns the cache key for the given entity value.default T
load(ID key)
default Map<ID,T>
loadAll(Collection<? extends ID> colKeys)
-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
-
-
-
-
Method Detail
-
getId
default ID getId(T value)
Returns the cache key for the given entity value.- Parameters:
value
- the entity value to obtain the cache key from- Returns:
- the cache key for the given entity value
-
load
@Transactional default T load(ID key)
-
loadAll
@Transactional default Map<ID,T> loadAll(Collection<? extends ID> colKeys)
-
-