Class SlardarCacheProp
-
- All Implemented Interfaces:
@ConfigurationProperties(value = SlardarCacheProp.Key) public class SlardarCacheProp
LRU (Least Recently Used) default, unit is second, 0=infinitely
- Since:
2021-02-11
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSlardarCacheProp.Conf
-
Field Summary
Fields Modifier and Type Field Description public final static StringKeypublic Stringprimarypublic final static StringKey$primarypublic final static StringKey$expandpublic intnullSizepublic final static StringKey$nullSizepublic intnullLivepublic final static StringKey$nullLivepublic SlardarCacheProp.Confcommonpublic final static StringKey$commonpublic Map<String, SlardarCacheProp.Conf>levelpublic final static StringKey$level
-
Constructor Summary
Constructors Constructor Description SlardarCacheProp()
-
Method Summary
Modifier and Type Method Description StringgetPrimary()which CacheManager is primary: MemoryCacheManager | ServerCacheManager - `MemoryCacheManager` - Cache2k Jvm cache - `ServerCacheManager` - Hazelcast distributed cachevoidsetPrimary(String primary)which CacheManager is primary: MemoryCacheManager | ServerCacheManager - `MemoryCacheManager` - Cache2k Jvm cache - `ServerCacheManager` - Hazelcast distributed cacheintgetNullSize()in principle, null is not cached. However, it can be handled uniformly. - `positive` - cache size - `0` - do not cache null - `negative` - no uniform processingvoidsetNullSize(int nullSize)in principle, null is not cached. However, it can be handled uniformly. - `positive` - cache size - `0` - do not cache null - `negative` - no uniform processingintgetNullLive()in principle, null is not cached. voidsetNullLive(int nullLive)in principle, null is not cached. SlardarCacheProp.ConfgetCommon()default configuration other than level - `max-live`=`3600`, expireAfterWrite(Time To Live) - `max-idle`=`0`, expireAfterAccess(Time To Idle) - `max-size`=`50000`, cache sizevoidsetCommon(SlardarCacheProp.Conf common)default configuration other than level - `max-live`=`3600`, expireAfterWrite(Time To Live) - `max-idle`=`0`, expireAfterAccess(Time To Idle) - `max-size`=`50000`, cache sizeMap<String, SlardarCacheProp.Conf>getLevel()Note, Server using hazelcast will ignore the common setting to avoid non-cache IMap errors. voidsetLevel(Map<String, SlardarCacheProp.Conf> level)Note, Server using hazelcast will ignore the common setting to avoid non-cache IMap errors. booleanisExpand()whether to Resolve the cache name, that is, to append the concrete class name booleanequals(@Nullable() Object o)inthashCode()StringtoString()voidsetExpand(boolean expand)whether to Resolve the cache name, that is, to append the concrete class name -
-
Method Detail
-
getPrimary
String getPrimary()
which CacheManager is primary: MemoryCacheManager | ServerCacheManager - `MemoryCacheManager` - Cache2k Jvm cache - `ServerCacheManager` - Hazelcast distributed cache
-
setPrimary
void setPrimary(String primary)
which CacheManager is primary: MemoryCacheManager | ServerCacheManager - `MemoryCacheManager` - Cache2k Jvm cache - `ServerCacheManager` - Hazelcast distributed cache
-
getNullSize
int getNullSize()
in principle, null is not cached. However, it can be handled uniformly. - `positive` - cache size - `0` - do not cache null - `negative` - no uniform processing
-
setNullSize
void setNullSize(int nullSize)
in principle, null is not cached. However, it can be handled uniformly. - `positive` - cache size - `0` - do not cache null - `negative` - no uniform processing
-
getNullLive
int getNullLive()
in principle, null is not cached. However, it can be handled uniformly.
-
setNullLive
void setNullLive(int nullLive)
in principle, null is not cached. However, it can be handled uniformly.
-
getCommon
SlardarCacheProp.Conf getCommon()
default configuration other than level - `max-live`=`3600`, expireAfterWrite(Time To Live) - `max-idle`=`0`, expireAfterAccess(Time To Idle) - `max-size`=`50000`, cache size
-
setCommon
void setCommon(SlardarCacheProp.Conf common)
default configuration other than level - `max-live`=`3600`, expireAfterWrite(Time To Live) - `max-idle`=`0`, expireAfterAccess(Time To Idle) - `max-size`=`50000`, cache size
-
getLevel
Map<String, SlardarCacheProp.Conf> getLevel()
Note, Server using hazelcast will ignore the common setting to avoid non-cache IMap errors. level setting, you need to use wildcard like `program~*`, see WingsCache naming and separator
-
setLevel
void setLevel(Map<String, SlardarCacheProp.Conf> level)
Note, Server using hazelcast will ignore the common setting to avoid non-cache IMap errors. level setting, you need to use wildcard like `program~*`, see WingsCache naming and separator
-
isExpand
boolean isExpand()
whether to Resolve the cache name, that is, to append the concrete class name
-
hashCode
int hashCode()
-
setExpand
void setExpand(boolean expand)
whether to Resolve the cache name, that is, to append the concrete class name
-
-
-
-