Class CaffeineCacheControlPanel
java.lang.Object
io.micronaut.controlpanel.core.AbstractControlPanel<AbstractCacheControlPanel.Body>
io.micronaut.controlpanel.core.AbstractEachBeanControlPanel<AbstractCacheControlPanel.Body>
io.micronaut.controlpanel.panels.cache.AbstractCacheControlPanel<io.micronaut.cache.caffeine.DefaultSyncCache>
io.micronaut.controlpanel.panels.cache.CaffeineCacheControlPanel
- All Implemented Interfaces:
ConfigurableControlPanel,ControlPanel<AbstractCacheControlPanel.Body>,io.micronaut.core.naming.Named,io.micronaut.core.order.Ordered,io.micronaut.core.util.Toggleable
@EachBean(io.micronaut.cache.caffeine.DefaultSyncCache.class)
public class CaffeineCacheControlPanel
extends AbstractCacheControlPanel<io.micronaut.cache.caffeine.DefaultSyncCache>
Control panel for managing Caffeine caches.
Provides cache information and operations specific to Caffeine-based caches.
- Since:
- 2.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.controlpanel.panels.cache.AbstractCacheControlPanel
AbstractCacheControlPanel.BodyNested classes/interfaces inherited from interface io.micronaut.controlpanel.core.ControlPanel
ControlPanel.Category, ControlPanel.View -
Field Summary
Fields inherited from class io.micronaut.controlpanel.panels.cache.AbstractCacheControlPanel
ENABLED_PROPERTY, NAMEFields inherited from class io.micronaut.controlpanel.core.AbstractControlPanel
configuration, controlPanelNameFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCaffeineCacheControlPanel(io.micronaut.cache.caffeine.DefaultSyncCache cache, ControlPanelConfiguration configuration) Constructor. -
Method Summary
Methods inherited from class io.micronaut.controlpanel.panels.cache.AbstractCacheControlPanel
getBadge, getBeanName, getBody, getCategory, getPanelNameMethods inherited from class io.micronaut.controlpanel.core.AbstractEachBeanControlPanel
getBodyView, getDetailedView, getName, getTitleMethods inherited from class io.micronaut.controlpanel.core.AbstractControlPanel
getOrder, isEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.controlpanel.core.ControlPanel
hasDetails
-
Constructor Details
-
CaffeineCacheControlPanel
protected CaffeineCacheControlPanel(@Parameter io.micronaut.cache.caffeine.DefaultSyncCache cache, @Named("cache") ControlPanelConfiguration configuration) Constructor.- Parameters:
cache- the Caffeine cache instanceconfiguration- the control panel configuration
-
-
Method Details
-
getCache
protected io.micronaut.cache.caffeine.DefaultSyncCache getCache()- Specified by:
getCachein classAbstractCacheControlPanel<io.micronaut.cache.caffeine.DefaultSyncCache>
-
getCacheSize
Description copied from class:AbstractCacheControlPanelAttempts to determine the size of the cache. Supports Map-based caches and Iterable-based caches. Subclasses can override this method to provide more accurate size calculations for specific cache implementations.- Overrides:
getCacheSizein classAbstractCacheControlPanel<io.micronaut.cache.caffeine.DefaultSyncCache>- Returns:
- an Optional containing the cache size, or empty if it cannot be determined
-
getCacheAsMap
- Specified by:
getCacheAsMapin classAbstractCacheControlPanel<io.micronaut.cache.caffeine.DefaultSyncCache>
-
getIcon
Returns the icon for Caffeine cache control panels.- Specified by:
getIconin interfaceConfigurableControlPanel- Overrides:
getIconin classAbstractCacheControlPanel<io.micronaut.cache.caffeine.DefaultSyncCache>- Returns:
- the icon name
-