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

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class SlardarCacheProp.Conf
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getPrimary()
      which CacheManager is primary: MemoryCacheManager | ServerCacheManager
      - `MemoryCacheManager` - Cache2k Jvm cache
      - `ServerCacheManager` - Hazelcast distributed cache
      
      void setPrimary(String primary)
      which CacheManager is primary: MemoryCacheManager | ServerCacheManager
      - `MemoryCacheManager` - Cache2k Jvm cache
      - `ServerCacheManager` - Hazelcast distributed cache
      
      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
      
      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
      
      int getNullLive() in principle, null is not cached.
      void setNullLive(int nullLive) in principle, null is not cached.
      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
      
      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
      
      Map<String, SlardarCacheProp.Conf> getLevel() Note, Server using hazelcast will ignore the common setting to avoid non-cache IMap errors.
      void setLevel(Map<String, SlardarCacheProp.Conf> level) Note, Server using hazelcast will ignore the common setting to avoid non-cache IMap errors.
      boolean isExpand() whether to Resolve the cache name, that is, to append the concrete class name
      boolean equals(@Nullable() Object o)
      int hashCode()
      String toString()
      void setExpand(boolean expand) whether to Resolve the cache name, that is, to append the concrete class name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SlardarCacheProp

        SlardarCacheProp()
    • 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

      • setExpand

         void setExpand(boolean expand)

        whether to Resolve the cache name, that is, to append the concrete class name