rishabhdaim opened a new pull request, #2814:
URL: https://github.com/apache/jackrabbit-oak/pull/2814

   ## Summary
   
   Introduces the Oak-owned cache API in `oak-core-spi` 
(`org.apache.jackrabbit.oak.cache`), decoupling callers from CacheLIRS and 
Guava implementation details. This is TASK-1 of the Caffeine migration 
(OAK-11300).
   
   ## Changes
   
   - `OakCache<K,V>` — size-bounded thread-safe cache interface 
(`@ProviderType`)
   - `OakLoadingCache<K,V>` — extends `OakCache`, adds auto-loading `get(K)` 
and `refresh(K)` (`@ProviderType`)
   - `OakCacheLoader<K,V>` — `@FunctionalInterface` loader supplied to 
`OakCacheBuilder.build()`
   - `OakWeigher<K,V>` — `@FunctionalInterface` weigher for weight-based 
eviction
   - `OakRemovalListener<K,V>` — `@FunctionalInterface` eviction/invalidation 
callback
   - `OakRemovalCause` — enum (`EXPLICIT`, `REPLACED`, `SIZE`, `EXPIRED`, 
`COLLECTED`)
   - `OakCacheStats` — immutable value object with hit/miss/load/eviction 
counters and `minus()` delta support
   - `package-info.java` — bumped `@Version` from `2.0` to `2.1` (OSGi minor 
bump for new public types)
   - `OakCacheStatsTest` — 9 JUnit 4 tests covering all methods and edge cases
   
   No production call sites are changed in this task. `OakCacheBuilder` 
(TASK-2) will wire these interfaces to CacheLIRS and Caffeine adapters.
   
   ## Test Plan
   
   - [x] `OakCacheStatsTest` — 9 tests, all passing
   - [x] `mvn test -pl oak-core-spi` — BUILD SUCCESS
   
   ## Links
   
   - JIRA: https://issues.apache.org/jira/browse/OAK-12147
   - Parent: https://issues.apache.org/jira/browse/OAK-11300


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to