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 AbstractCacheControlPanel
AbstractCacheControlPanel.BodyNested classes/interfaces inherited from interface ControlPanel
ControlPanel.Category, ControlPanel.View -
Field Summary
Fields inherited from class AbstractCacheControlPanel
ENABLED_PROPERTY, NAMEFields inherited from class 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 AbstractCacheControlPanel
getBadge, getBeanName, getBody, getCategory, getPanelNameMethods inherited from class AbstractEachBeanControlPanel
getBodyView, getDetailedView, getName, getTitleMethods inherited from class AbstractControlPanel
getOrder, isEnabledMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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
-