As a preparation to enable better monitoring and add more precise monitoring probes to the deduplication caches I would like to unify their interfaces and simplify their setup.
- Don't expose the cache statistics via the FileStore and leverage the the FileStoreBuilder instead for this.
- All deduplication caches should implement a unified Cache interface to simplify wrapping them (e.g. for additional access statistics collection).
- Replace the ad-hoc collection of cache statistics in the NodeWriteStats inner class of the SegmentWriter and replace it with a more structured approach.
- Expose additional cache access statistics via Metrics.
- The additional statistics should discriminate caches access occurring as regular writes from such occurring during compaction.