===================================================================
- Flush
缓存条目向低层次移动。
-
Fault:从低层拷贝一个对象到高层。在获取缓存的过程中,某一层发现自己的该缓存条目已经失效,就触发了Fault行为。
-
Eviction:把缓存条目除去。
-
Expiration:失效状态。
-
Pinning:强制缓存条目保持在某一层。
下图反映数据在各个层之间的流转及各层数据的生命周期
L1:本地内存层
L2:Terracotta服务节点层
=================================================================
<defaultCache
maxElementsInMemory=“10000”
eternal=“false”
overflowToDisk=“true”
timeToIdleSeconds=“0”
timeToLiveSeconds=“0”
diskPersistent=“false”
diskExpiryThreadIntervalSeconds=“120”/>
<cache name=“CACHE1”
maxElementsInMemory=“1000”
eternal=“true”
overflowToDisk=“true”/>
<cache name=“CACHE2”
maxElementsInMemory=“1000”
eternal=“false”
timeToIdleSeconds=“200”
timeToLiveSeconds=“4000”
overflowToDisk=“true”/>