类 AbstractCacheCreator
java.lang.Object
org.babyfish.jimmer.sql.cache.spi.AbstractCacheCreator
- 所有已实现的接口:
CacheCreator
- 直接已知子类:
RedisCacheCreator
-
嵌套类概要
嵌套类修饰符和类型类说明protected static classprotected static class -
字段概要
字段从接口继承的字段 org.babyfish.jimmer.sql.cache.CacheCreator
DEFAULT_LOCAL_CACHE_MAX_SIZE, DEFAULT_LOCAL_DURATION, DEFAULT_REMOTE_DURATION, DEFAULT_REMOTE_DURATION_RANDOM_PERCENT -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected final <A extends AbstractCacheCreator.Args>
Aargs()protected abstract AbstractCacheCreator.Argsprotected abstract CacheCreator@NotNull CacheCreatorwithLocalCache(int maximumSize, Duration duration) @NotNull CacheCreatorwithLock(@Nullable CacheLocker locker, @Nullable Duration waitDuration, @Nullable Duration leaseDuration) @NotNull CacheCreatorwithMultiViewProperties(@Nullable Integer localMaximumSize, @Nullable Duration localDuration, @Nullable Duration remoteDuration) @NotNull CacheCreatorwithRemoteDuration(@Nullable Duration duration, int randomPercent) Set L2 cache expiration time.@NotNull CacheCreatorwithTracking(@Nullable CacheTracker tracker) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.babyfish.jimmer.sql.cache.CacheCreator
createForObject, createForProp, withHardLock, withLocalCache, withLocalCache, withMultiViewProperties, withoutLocalCache, withoutLock, withoutTracking, withRemoteDuration, withSoftLock
-
字段详细资料
-
cfg
-
-
构造器详细资料
-
AbstractCacheCreator
-
-
方法详细资料
-
withRemoteDuration
@NewChain @NotNull public @NotNull CacheCreator withRemoteDuration(@Nullable @Nullable Duration duration, int randomPercent) 从接口复制的说明:CacheCreatorSet L2 cache expiration time.This method does not modify the current object, but creates a new object.
- 指定者:
withRemoteDuration在接口中CacheCreator- 参数:
duration- The expiration timerandomPercent- A random percentBatch loading is a frequently used optimization method in jimmer, so a batch of values are often put into the cache at the same time. If the expiration time of these cached data is the same, then in the future, some affected data will be discarded by the cache at the same time so that a big hole will appear in the defense of the cache, which is easy to be penetrated.
To solve this problem, Jimmer supports a random factor that modifies the expiration time and then applies it to the L2 cache, ultimately making the expiration time of the data uneven.
- 返回:
- The created new object
-
withLocalCache
- 指定者:
withLocalCache在接口中CacheCreator
-
withLock
@NewChain @NotNull public @NotNull CacheCreator withLock(@Nullable @Nullable CacheLocker locker, @Nullable @Nullable Duration waitDuration, @Nullable @Nullable Duration leaseDuration) - 指定者:
withLock在接口中CacheCreator
-
withTracking
@NewChain @NotNull public @NotNull CacheCreator withTracking(@Nullable @Nullable CacheTracker tracker) - 指定者:
withTracking在接口中CacheCreator
-
withMultiViewProperties
@NewChain @NotNull public @NotNull CacheCreator withMultiViewProperties(@Nullable @Nullable Integer localMaximumSize, @Nullable @Nullable Duration localDuration, @Nullable @Nullable Duration remoteDuration) - 指定者:
withMultiViewProperties在接口中CacheCreator
-
args
-
newArgs
-
newCacheCreator
-