org.ehcache.internal.store.offheap
Class EhcacheConcurrentOffHeapClockCache<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
          extended by org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache<K,V>
              extended by org.ehcache.internal.store.offheap.EhcacheConcurrentOffHeapClockCache<K,V>
All Implemented Interfaces:
java.util.concurrent.ConcurrentMap<K,V>, java.util.Map<K,V>, EhcacheOffHeapBackingMap<K,V>, org.terracotta.offheapstore.concurrent.ConcurrentMapInternals, org.terracotta.offheapstore.MapInternals, org.terracotta.offheapstore.pinning.PinnableCache<K,V>

public class EhcacheConcurrentOffHeapClockCache<K,V>
extends org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache<K,V>
implements EhcacheOffHeapBackingMap<K,V>

EhcacheConcurrentOffHeapClockCache


Nested Class Summary
 
Nested classes/interfaces inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap.AggregateIterator<T>
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
segments
 
Constructor Summary
protected EhcacheConcurrentOffHeapClockCache(org.terracotta.offheapstore.util.Factory<? extends org.terracotta.offheapstore.pinning.PinnableSegment<K,V>> segmentFactory, int ssize)
           
 
Method Summary
 V compute(K key, BiFunction<K,V,V> mappingFunction, boolean pin)
           
 boolean computeIfPinned(K key, BiFunction<K,V,V> remappingFunction, Function<V,java.lang.Boolean> pinningFunction)
           
 V computeIfPresent(K key, BiFunction<K,V,V> mappingFunction)
           
 long nextIdFor(K key)
           
 
Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache
fill, getAndPin, isPinned, putPinned, segmentFor, setPinning, shrink, shrinkOthers
 
Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
clear, containsKey, containsValue, destroy, entrySet, fill, get, getAllocatedMemory, getAndSetMetadata, getConcurrency, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getIndexFor, getMetadata, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSegmentInternals, getSegments, getSize, getTableCapacity, getUsedSlotCount, getValueAndSetMetadata, getVitalMemory, handleOversizeMappingException, keySet, put, put, putIfAbsent, readLockAll, readUnlockAll, remove, remove, removeNoReturn, replace, replace, segmentFor, size, values, writeLockAll, writeUnlockAll
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ehcache.internal.store.offheap.EhcacheOffHeapBackingMap
getAndPin, getAndSetMetadata, getSegments, shrinkOthers
 
Methods inherited from interface java.util.concurrent.ConcurrentMap
putIfAbsent, remove, replace, replace
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

EhcacheConcurrentOffHeapClockCache

protected EhcacheConcurrentOffHeapClockCache(org.terracotta.offheapstore.util.Factory<? extends org.terracotta.offheapstore.pinning.PinnableSegment<K,V>> segmentFactory,
                                             int ssize)
Method Detail

compute

public V compute(K key,
                 BiFunction<K,V,V> mappingFunction,
                 boolean pin)
Specified by:
compute in interface EhcacheOffHeapBackingMap<K,V>

computeIfPresent

public V computeIfPresent(K key,
                          BiFunction<K,V,V> mappingFunction)
Specified by:
computeIfPresent in interface EhcacheOffHeapBackingMap<K,V>

computeIfPinned

public boolean computeIfPinned(K key,
                               BiFunction<K,V,V> remappingFunction,
                               Function<V,java.lang.Boolean> pinningFunction)
Specified by:
computeIfPinned in interface EhcacheOffHeapBackingMap<K,V>

nextIdFor

public long nextIdFor(K key)
Specified by:
nextIdFor in interface EhcacheOffHeapBackingMap<K,V>