クラス FineGrainedLockIndexedConcurrentHashMapCacheStore
java.lang.Object
org.iplass.mtp.impl.cache.store.builtin.SimpleCacheStoreBase
org.iplass.mtp.impl.cache.store.builtin.FineGrainedLockIndexedConcurrentHashMapCacheStore
- すべての実装されたインタフェース:
CacheStore
CacheEntryの更新処理の並列性を向上するため、 細粒度にロックを制御しつつCache本体とIndexの更新の整合性をとるCacheStore。
Cache本体とIndexの更新処理はAtomicであるが、 IndexedConcurrentHashMapCacheStoreと異なり、
一括更新操作系(removeAll、removeByIndex)は呼び出し時点でロックをとらず取得したリストに対しての操作になり、
厳密にはシリアライズされず別スレッドで並列にCacheが更新されることはある。
比較的高頻度のCacheEntryの更新があるような場合の利用を想定。
-
コンストラクタの概要
コンストラクタコンストラクタ説明FineGrainedLockIndexedConcurrentHashMapCacheStore(String namespace, CacheStoreFactory factory, int initialCapacity, TimeToLiveCalculator timeToLiveCalculator, int size, int indexCount, List<FineGrainedLockIndexConfig> indexConfig) -
メソッドの概要
修飾子とタイプメソッド説明compute(Object key, BiFunction<Object, CacheEntry, CacheEntry> remappingFunction) remappingFunctionは同一keyに対しての処理は他の競合スレッドはブロックされ、アトミックに処理される。computeIfAbsent(Object key, Function<Object, CacheEntry> mappingFunction) mappingFunctionはkeyが紐づいていない際に、厳密に一度のみの呼び出しとなる。voiddestroy()getByIndex(int indexKey, Object indexValue) getListByIndex(int indexKey, Object indexValue) intgetSize()keySet()put(CacheEntry entry, boolean isClean) putIfAbsent(CacheEntry entry) booleanremove(CacheEntry entry) voidremoveByIndex(int indexKey, Object indexValue) protected voidprotected voidremoveNullEntry(NullKey key) replace(CacheEntry entry) booleanreplace(CacheEntry oldEntry, CacheEntry newEntry) trace()クラスから継承されたメソッド org.iplass.mtp.impl.cache.store.builtin.SimpleCacheStoreBase
addCacheEventListenner, baseTrace, getFactory, getListeners, getNamespace, hasListener, margeVal, notifyInvalidated, notifyPut, notifyRemoved, notifyUpdated, removeCacheEventListenner, subtractValクラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitインタフェースから継承されたメソッド org.iplass.mtp.impl.cache.store.CacheStore
computeIfAbsentWithAutoReload
-
コンストラクタの詳細
-
FineGrainedLockIndexedConcurrentHashMapCacheStore
public FineGrainedLockIndexedConcurrentHashMapCacheStore(String namespace, CacheStoreFactory factory, int initialCapacity, TimeToLiveCalculator timeToLiveCalculator, int size, int indexCount, List<FineGrainedLockIndexConfig> indexConfig)
-
-
メソッドの詳細
-
removeInvalidEntry
protected void removeInvalidEntry()- 定義:
removeInvalidEntryクラス内SimpleCacheStoreBase
-
get
-
put
- パラメータ:
entry-isClean- putするentryが更新されたものでない場合(他のNodeで読み込まれていても問題ない場合)ture
-
remove
-
removeAll
public void removeAll() -
putIfAbsent
-
computeIfAbsent
mappingFunctionはkeyが紐づいていない際に、厳密に一度のみの呼び出しとなる。- パラメータ:
key-mappingFunction-- 戻り値:
-
compute
remappingFunctionは同一keyに対しての処理は他の競合スレッドはブロックされ、アトミックに処理される。- パラメータ:
key-remappingFunction-- 戻り値:
-
remove
-
replace
-
replace
-
keySet
-
getByIndex
-
getListByIndex
-
removeByIndex
-
removeNullEntry
- 定義:
removeNullEntryクラス内SimpleCacheStoreBase
-
getSize
public int getSize() -
trace
-
destroy
public void destroy()
-