| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final HeapCacheBackEnd | |
| private final OperationObserver | |
| private volatile List | |
| private final OperationObserver | |
| private final OperationObserver |
| Access | Constructor and Description |
|---|---|
| public | OnHeapCachingTier(final HeapCacheBackEnd<K, Object>
the HeapCacheBackEnd that will back this CachingTier backEnd)A Constructor |
| Modifier and Type | Method and Description |
|---|---|
| public void | addListener(final CachingTier.
the listener to add listenerImplements net. Listener to the cache
|
| public void | |
| public void | clearAndNotify()
Implements net. |
| public boolean | contains(final K key)
Implements net. |
| public static OnHeapCachingTier | Returns: the OnHeapCachingTier properly configured for this cachethe cache we're planning to back cache, final Pool the pool, if any, to use onHeapPool)Factory method |
| pack-priv static Policy | Returns: the chosen eviction policythe cache cache)Chooses the Policy from the cache configuration |
| public V | get(final K
the key to look up key, final Callable<V> the source to use, in the case of no mapping present source, final boolean true to update the stats, false otherwise updateStats)Implements net. |
| private static long | |
| public Policy | getEvictionPolicy()
Implements net. |
| public int | getInMemorySize()
Implements net. |
| public long | getInMemorySizeInBytes()
Implements net. |
| public int | getOffHeapSize()
Implements net. |
| public long | getOffHeapSizeInBytes()
Implements net. |
| public long | getOnDiskSizeInBytes()
Implements net. |
| private V | |
| public boolean | loadOnPut()
Implements net. true if values should be loaded to this cache on put.
|
| public void | recalculateSize(final K
the key to perform the recalculation for key)Implements net. |
| public V | remove(final K
the key to the mapping to remove key)Implements net. |
| public void | setEvictionPolicy(final Policy
the policy to use policy)Implements net. |
| backEnd | back to summary |
|---|---|
| private final HeapCacheBackEnd<K, Object> backEnd
| |
| getObserver | back to summary |
|---|---|
| private final OperationObserver<StoreOperationOutcomes. | |
| listeners | back to summary |
|---|---|
| private volatile List<CachingTier. | |
| putObserver | back to summary |
|---|---|
| private final OperationObserver<StoreOperationOutcomes. | |
| removeObserver | back to summary |
|---|---|
| private final OperationObserver<StoreOperationOutcomes. | |
| OnHeapCachingTier | back to summary |
|---|---|
| public OnHeapCachingTier(final HeapCacheBackEnd<K, Object> backEnd) A Constructor
| |
| addListener | back to summary |
|---|---|
| public void addListener(final CachingTier. Implements net. Doc from net. Adds a
| |
| clear | back to summary |
|---|---|
| public void clear() Implements net. Doc from net. Clears the cache... Doesn't notify any listeners
| |
| clearAndNotify | back to summary |
|---|---|
| public void clearAndNotify() Implements net. Doc from net. Clears the cache notifying listeners
| |
| contains | back to summary |
|---|---|
| public boolean contains(final K key) Implements net. Doc from net. This should go away once the stats are in As the method is only there to know what tier the key is going to be fetched from
| |
| createOnHeapCache | back to summary |
|---|---|
| public static OnHeapCachingTier Factory method
| |
| determineEvictionPolicy | back to summary |
|---|---|
| pack-priv static Policy determineEvictionPolicy(Ehcache cache) Chooses the Policy from the cache configuration | |
| get | back to summary |
|---|---|
| public V get(final K key, final Callable<V> source, final boolean updateStats) Implements net. Doc from net. Returns the value associated with the key, or populates the mapping using the Callable instance | |
| getCachingTierMaxEntryCount | back to summary |
|---|---|
| private static long getCachingTierMaxEntryCount(final Ehcache cache) | |
| getEvictionPolicy | back to summary |
|---|---|
| public Policy getEvictionPolicy() Implements net. Doc from net. queries the potential eviction policy for the heap caching tier | |
| getInMemorySize | back to summary |
|---|---|
| public int getInMemorySize() Implements net. Doc from net. Can we avoid having this somehow ?
| |
| getInMemorySizeInBytes | back to summary |
|---|---|
| public long getInMemorySizeInBytes() Implements net. Doc from net. CacheTier could keep hold of the PoolAccessors for each tier... But what about non pooled resources ?
| |
| getOffHeapSize | back to summary |
|---|---|
| public int getOffHeapSize() Implements net. Doc from net. Can we avoid having this somehow ?
| |
| getOffHeapSizeInBytes | back to summary |
|---|---|
| public long getOffHeapSizeInBytes() Implements net. Doc from net. CacheTier could keep hold of the PoolAccessors for each tier... But what about non pooled resources ?
| |
| getOnDiskSizeInBytes | back to summary |
|---|---|
| public long getOnDiskSizeInBytes() Implements net. Doc from net. CacheTier could keep hold of the PoolAccessors for each tier... But what about non pooled resources ?
| |
| getValue | back to summary |
|---|---|
| private V getValue(final Object cachedValue) | |
| loadOnPut | back to summary |
|---|---|
| public boolean loadOnPut() Implements net. Doc from net. Returns This may be a dynamic decision, based for example on the occupancy of the cache.
| |
| recalculateSize | back to summary |
|---|---|
| public void recalculateSize(final K key) Implements net. Doc from net. This is evil! Don't call this!
| |
| remove | back to summary |
|---|---|
| public V remove(final K key) Implements net. Doc from net. Removes the mapping associated to the key passed in
| |
| setEvictionPolicy | back to summary |
|---|---|
| public void setEvictionPolicy(final Policy policy) Implements net. Doc from net. sets the eviction policy on the heap caching tier | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final Callable | |
| private Throwable | |
| private V |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private V | |
| private V |
| complete | back to summary |
|---|---|
| private boolean complete | |
| source | back to summary |
|---|---|
| private final Callable<V> source | |
| throwable | back to summary |
|---|---|
| private Throwable throwable | |
| value | back to summary |
|---|---|
| private V value | |
| Fault | back to summary |
|---|---|
| public Fault(final Callable<V> source) | |
| complete | back to summary |
|---|---|
| private void complete(V value) | |
| fail | back to summary |
|---|---|
| private void fail(final Throwable t) | |
| get | back to summary |
|---|---|
| private V get() | |
| throwOrReturn | back to summary |
|---|---|
| private V throwOrReturn() | |