@Configuration(proxyBeanMethods=false)
@ConditionalOnClass(value=net.jodah.expiringmap.ExpiringMap.class)
@ConditionalOnProperty(name="assembly.cache.client",
havingValue="expire_map",
matchIfMissing=true)
public class ExpiringMapConfiguration
extends CacheCommonsConfiguration
implements CacheBannerDisplayDevice, org.springframework.context.EnvironmentAware
ExpiringMap.
The following is an explanation of important parameters
CacheProperties.getExpiringMap().Max Size : the maximum length of the map, add the 1001 th
entry, can lead to the first expired immediately (even if not to
expiration time).Expiration : expiration time and expired unit, set the expiration
time, is permanent.CREATED: when each update element, the countdown reset date.ACCESSED : in every visit elements, the countdown reset date.Variable Expiration : allows you to update the Expiration time value,
if not set variable Expiration.UnsupportedOperationException.
Provide a configuration for you to load relevant build configurations related
to ExpiringMap, and select this cache configuration to load and use
in the main assembly class by default.
| 构造器和说明 |
|---|
ExpiringMapConfiguration(CacheProperties properties) |
| 限定符和类型 | 方法和说明 |
|---|---|
top.osjf.assembly.cache.factory.CacheFactory |
expiringMapCacheExecutorFactory() |
org.springframework.core.env.Environment |
getEnvironment() |
Class<?> |
getSourceClass()
Obtain a resource class object that can obtain the version.
|
StartUpBanner |
getStartUpBanner()
Obtain a
StartUpBanner implementation class. |
void |
printBanner(org.springframework.core.env.Environment environment,
Class<?> sourceClass,
PrintStream out) |
void |
setEnvironment(org.springframework.core.env.Environment environment) |
getPropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterPropertiesSetpublic ExpiringMapConfiguration(CacheProperties properties)
public void printBanner(org.springframework.core.env.Environment environment,
Class<?> sourceClass,
PrintStream out)
printBanner 在接口中 org.springframework.boot.BannerprintBanner 在接口中 CacheBannerDisplayDevicepublic void setEnvironment(@NotNull
org.springframework.core.env.Environment environment)
setEnvironment 在接口中 org.springframework.context.EnvironmentAware@NotNull public org.springframework.core.env.Environment getEnvironment()
getEnvironment 在接口中 org.springframework.core.env.EnvironmentCapablegetEnvironment 在接口中 CacheBannerDisplayDevice@NotNull public Class<?> getSourceClass()
CacheBannerDisplayDeviceIf it is the original, it defaults to CacheVersion to
obtain the version of this project.
getSourceClass 在接口中 CacheBannerDisplayDevice@NotNull public StartUpBanner getStartUpBanner()
CacheBannerDisplayDeviceStartUpBanner implementation class.getStartUpBanner 在接口中 CacheBannerDisplayDeviceStartUpBanner associated with this assembly.@Bean @ConditionalOnMissingBean(value=top.osjf.assembly.cache.factory.CacheFactory.class) public top.osjf.assembly.cache.factory.CacheFactory expiringMapCacheExecutorFactory()
Copyright © 2023. All rights reserved.