A project that shows caching solution approaches with code generation Lombok and AutoValue
Jacoco
/cobertura
code coverage, pmd
, checkstyle
, enforcer
, findbugs
org.caching.autovalue
contains example with builder, equals, hashcode, getters, setters example without much flexibilityorg.caching.lombok
contains examples with Lombok features. In IDE plugins for Lombok are needed. Main features: getters, setters, equals, hashcode, builder, lazy getter, sneakyThrows, synchronized, logger code generation.Ehcache2TransactionDaoTest
test for direct usage of ehcache version 2 with springJbossCacheTransactionDaoTest
test with Jboss cache usageJCacheEhCache2TransactionDaoTest
jcache standard protocol with Ehcache 2 version as an implementation Use getClass().getClassLoader().getResourceAsStream("filename") instead of full path to file (like: scr/main/resources/filename) which is not a case in jar fileJCacheEhCache3TransactionDaoTest
jcache standard protocol with Ehcache 3 version as an implementation with spring (no spring configuration for direct usage of ehcache 3 yet).JCacheHazelcastTransactionDaoTest
jcache standard protocol with Hazelcast as an implementationSpringCacheTransactionDaoTest
test for spring simple cache usage Tests show saving to cache / without cache and reading the values. With Cache look ups are quicker. Evict does nothing, cause small data. Clearing cache shows that cache is not hit in this case.GuavaCacheTest
test Guava abilities to cache
mvn clean package
Excluded some auto generated classes from cobertura and coveralls coverage for lombok
and autovalue
cause they do not support it well
Libraries:
- hazelcast
- ehcache 2
- ehcache 3
- jboss cache
- jcache
- guava
- spring
- lombok
- autovalue
- log4j logging (possibility to configure) via slf4j