[TASK] Implement cache region list and statistics endpoints
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
Implement two endpoints in CacheResource.java for the Maintenance portlet Cache tab: one to list cache region names (for the flush dropdown) and one to return cache statistics (JVM memory + per-provider per-region hit/miss/size data).
Acceptance Criteria
GET /v1/caches
- API caller must receive an alphabetically sorted list of all cache region names
- Response must use standard
ResponseEntityViewwrapper - Must require backend user with Maintenance portlet access
GET /v1/caches/stats
- API caller must receive JVM memory information: maxMemory, allocatedMemory, usedMemory, freeMemory (as raw long values in bytes)
- API caller must receive a list of cache providers, each containing: providerName, column names, and per-region statistics
- Per-region statistics must include all columns from
CacheProviderStats.getStatColumns()with values fromCacheStats.getStatValue(col) - Must require backend user with Maintenance portlet access
Priority
None
Additional Context
- Region names come from
CacheLocator.getCacheIndexes()— returnsObject[], cast each to String and sort - Cache stats come from
CacheLocator.getCacheAdministrator().getCacheStatsList()— returnsList<CacheProviderStats> - Each
CacheProviderStatshasgetProviderName(),getStatColumns()(LinkedHashSet), andgetStats()(List of CacheStats) - JVM memory:
Runtime.getRuntime().maxMemory(),.totalMemory(),.freeMemory()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in CacheResource.java and trace CacheLocator.getCacheIndexes() for region names and CacheLocator.getCacheAdministrator().getCacheStatsList() for provider statistics. Implement the two GET endpoints with the ResponseEntityView wrapper and Maintenance portlet access, then verify the sorted regions, JVM memory values, provider columns, and per-region statistics match the acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100