| Modifier and Type | Class and Description |
|---|---|
| public static class | PooledBasedBackEnd.PoolParticipant
A pool participant to use with this Backend |
| Modifier and Type | Field and Description |
|---|---|
| private volatile ConcurrentHashMap. | |
| private final OperationObserver | |
| private static final Logger | |
| private static final int | |
| private volatile Policy | |
| private final AtomicReference | |
| private static final float |
| Access | Constructor and Description |
|---|---|
| public | PooledBasedBackEnd(final Policy
the policy it'll use to decide what to evict memoryEvictionPolicy)Constructs a Pooled backend |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear(final boolean
whether to notify listeners or not notify)Implements net. CHM.
|
| public boolean | Returns: return true if exactly the right amount of evictions could happen, false otherwiseamount of entries to be evicted evictions)tries to evict as many entries as specified |
| private Element | |
| public V | get(final Object
the key whose associated value is to be returned key)Overrides net. Implements net. CHM.
|
| public Policy | getPolicy()
Implements net. |
| public long | |
| public boolean | hasSpace()
Implements net. true if this tier has enough space for more entries.
|
| public V | put(final K
key with which the specified value is to be associated key, final V value to be associated with the specified key value)Overrides net. Implements java. |
| public void | putAll(final Map<? extends K, ? extends V>
mappings to be stored in this map m)Overrides net. Implements java. |
| public V | putIfAbsent(final K
key with which the specified value is to be associated key, final V value to be associated with the specified key value)Overrides net. Implements net. java. CHM.putIfAbsent(Object, Object)}, but
will evict if required (on successful put)
|
| public void | registerAccessor(final PoolAccessor<T extends PoolParticipant>
the pool accessor to use poolAccessor)Registers the accessor with the backend. |
| public void | registerEvictionCallback(final HeapCacheBackEnd.
the thing to call back on evictionCallbackImplements net. |
| public V | remove(final Object
key whose mapping is to be removed from the map key)Overrides net. Implements net. CHM.
|
| public boolean | remove(final Object
key with which the specified value is associated key, final Object value expected to be associated with the specified key value)Overrides net. Implements net. java. CHM.remove(Object, Object)}
|
| public boolean | replace(final K
key with which the specified value is associated key, final V value expected to be associated with the specified key oldValue, final V value to be associated with the specified key newValue)Overrides net. Implements net. CHM.
|
| public V | replace(final K
key with which the specified value is associated key, final V value to be associated with the specified key value)Overrides net. Implements java. |
| public void | setPolicy(final Policy
the new eviction Policy to use policy)Implements net. |
| callback | back to summary |
|---|---|
| private volatile ConcurrentHashMap. | |
| getObserver | back to summary |
|---|---|
| private final OperationObserver<StoreOperationOutcomes. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| MAX_EVICTIONS | back to summary |
|---|---|
| private static final int MAX_EVICTIONS | |
| policy | back to summary |
|---|---|
| private volatile Policy policy | |
| poolAccessor | back to summary |
|---|---|
| private final AtomicReference<PoolAccessor<T extends PoolParticipant>> poolAccessor Hides net. | |
| PUT_LOAD_THRESHOLD | back to summary |
|---|---|
| private static final float PUT_LOAD_THRESHOLD | |
| PooledBasedBackEnd | back to summary |
|---|---|
| public PooledBasedBackEnd(final Policy memoryEvictionPolicy) Constructs a Pooled backend
| |
| clear | back to summary |
|---|---|
| public void clear(final boolean notify) Implements net. Doc from net. Basically
| |
| evict | back to summary |
|---|---|
| public boolean evict(int evictions) tries to evict as many entries as specified
| |
| findEvictionCandidate | back to summary |
|---|---|
| private Element findEvictionCandidate() | |
| get | back to summary |
|---|---|
| public V get(final Object key) Overrides net. Implements net. Doc from net. Access a key,
basically | |
| getPolicy | back to summary |
|---|---|
| public Policy getPolicy() Implements net. Doc from net. queries the potential eviction policy for the heap caching tier | |
| getSizeInBytes | back to summary |
|---|---|
| public long getSizeInBytes()
Deprecated
Returns the size in bytes
| |
| hasSpace | back to summary |
|---|---|
| public boolean hasSpace() Implements net. Doc from net. Return
| |
| put | back to summary |
|---|---|
| public V put(final K key, final V value) Overrides net. Implements java. Doc from net. Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the
| |
| putAll | back to summary |
|---|---|
| public void putAll(final Map<? extends K, ? extends V> m) Overrides net. Implements java. Doc from net. Copies all of the mappings from the specified map to this one. These mappings replace any mappings that this map had for any of the keys currently in the specified map. | |
| putIfAbsent | back to summary |
|---|---|
| public V putIfAbsent(final K key, final V value) Overrides net. Implements net. Doc from net. Basically
| |
| registerAccessor | back to summary |
|---|---|
| public void registerAccessor(final PoolAccessor<T extends PoolParticipant> poolAccessor) Registers the accessor with the backend. This can only happen once!
| |
| registerEvictionCallback | back to summary |
|---|---|
| public void registerEvictionCallback(final HeapCacheBackEnd. Implements net. Doc from net. Let's you register a single callback for evictions
| |
| remove | back to summary |
|---|---|
| public V remove(final Object key) Overrides net. Implements net. Doc from net. Basically | |
| remove | back to summary |
|---|---|
| public boolean remove(final Object key, final Object value) Overrides net. Implements net. Doc from net. Basically | |
| replace | back to summary |
|---|---|
| public boolean replace(final K key, final V oldValue, final V newValue) Overrides net. Implements net. Doc from net. Basically
| |
| replace | back to summary |
|---|---|
| public V replace(final K key, final V value) Overrides net. Implements java. Doc from net. Replaces the entry for a key only if currently mapped to some value.
This is equivalent to, for this
except that the action is performed atomically.
| |
| setPolicy | back to summary |
|---|---|
| public void setPolicy(final Policy policy) Implements net. Dynamic property to switch the policy out
| |
| Modifier and Type | Field and Description |
|---|---|
| private final EventRateSimpleMovingAverage | |
| private final EventRateSimpleMovingAverage | |
| private final PooledBasedBackEnd |
| Access | Constructor and Description |
|---|---|
| public | PoolParticipant(final PooledBasedBackEnd<Object, Object>
the backend this participant represents pooledBasedBackEnd)Creates a pool participant |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | evict(final int
the number of elements to evict count, final long the size in bytes to free (hint) size)Implements net. |
| public long | getApproximateCountSize()
Implements net. |
| public float | getApproximateHitRate()
Implements net. |
| public float | getApproximateMissRate()
Implements net. |
| hitRate | back to summary |
|---|---|
| private final EventRateSimpleMovingAverage hitRate | |
| missRate | back to summary |
|---|---|
| private final EventRateSimpleMovingAverage missRate | |
| pooledBasedBackEnd | back to summary |
|---|---|
| private final PooledBasedBackEnd<Object, Object> pooledBasedBackEnd | |
| PoolParticipant | back to summary |
|---|---|
| public PoolParticipant(final PooledBasedBackEnd<Object, Object> pooledBasedBackEnd) Creates a pool participant
| |
| evict | back to summary |
|---|---|
| public boolean evict(final int count, final long size) Implements net. Doc from net. Perform eviction to release resources
| |
| getApproximateCountSize | back to summary |
|---|---|
| public long getApproximateCountSize() Implements net. Doc from net. Return the approximate size
| |
| getApproximateHitRate | back to summary |
|---|---|
| public float getApproximateHitRate() Implements net. Doc from net. Return the approximate hit rate
| |
| getApproximateMissRate | back to summary |
|---|---|
| public float getApproximateMissRate() Implements net. Doc from net. Return the approximate miss rate
| |