Class SimpleBookRepository
- java.lang.Object
-
- org.oxerr.spring.cache.redis.scored.example.spring.cache.redis.scored.SimpleBookRepository
-
- All Implemented Interfaces:
BookRepository
@Component public class SimpleBookRepository extends Object implements BookRepository
-
-
Constructor Summary
Constructors Constructor Description SimpleBookRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Book
getByIsbn(String isbn)
Book
saveBook(Book book)
private void
simulateSlowService()
-
-
-
Method Detail
-
getByIsbn
@Cacheable("books") public Book getByIsbn(String isbn)
- Specified by:
getByIsbn
in interfaceBookRepository
-
saveBook
@CachePut(value="books", key="#result.isbn") public Book saveBook(Book book)
- Specified by:
saveBook
in interfaceBookRepository
-
simulateSlowService
private void simulateSlowService()
-
-