|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridgain.grid.cache.eviction.fifo.GridCacheFifoEvictionPolicy<K,V>
public class GridCacheFifoEvictionPolicy<K,V>
Eviction policy based on First In First Out (FIFO) algorithm. This
implementation is very efficient since it is lock-free and does not
create any additional table-like data structures. The FIFO ordering
information is maintained by attaching ordering metadata to cache entries.
| Wiki | |
| Forum |
![]() |
![]() |
| Constructor Summary | |
|---|---|
GridCacheFifoEvictionPolicy()
Constructs LRU eviction policy with all defaults. |
|
GridCacheFifoEvictionPolicy(int max)
Constructs FIFO eviction policy with maximum size. |
|
GridCacheFifoEvictionPolicy(int max,
boolean allowEmptyEntries)
Constructs FIFO eviction policy with maximum size and allow empty entries flag specified. |
|
| Method Summary | |
|---|---|
int |
getCurrentSize()
Gets current queue size. |
int |
getMaxSize()
Gets maximum allowed size of cache before entry will start getting evicted. |
String |
getMetaAttributeName()
Gets name of metadata attribute used to store eviction policy data. |
boolean |
isAllowEmptyEntries()
Gets flag indicating whether empty entries (entries with null values)
are allowed. |
void |
onEntryAccessed(boolean rmv,
GridCacheEntry<K,V> entry)
Callback for whenever entry is accessed. |
Collection<GridCacheEntry<K,V>> |
queue()
Gets read-only view on internal FIFO queue in proper order. |
void |
setAllowEmptyEntries(boolean allowEmptyEntries)
Sets flag that allows empty entries (entries with null values)
to be stored in cache. |
void |
setMaxSize(int max)
Sets maximum allowed size of cache before entry will start getting evicted. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GridCacheFifoEvictionPolicy()
public GridCacheFifoEvictionPolicy(int max)
max - Maximum allowed size of cache before entry will start getting evicted.
public GridCacheFifoEvictionPolicy(int max,
boolean allowEmptyEntries)
max - Maximum allowed size of cache before entry will start getting evicted.allowEmptyEntries - If false, false empty entries will be evicted immediately.| Method Detail |
|---|
public int getMaxSize()
getMaxSize in interface GridCacheFifoEvictionPolicyMBeanpublic void setMaxSize(int max)
setMaxSize in interface GridCacheFifoEvictionPolicyMBeanmax - Maximum allowed size of cache before entry will start getting evicted.public boolean isAllowEmptyEntries()
null values)
are allowed.
isAllowEmptyEntries in interface GridCacheFifoEvictionPolicyMBeanTrue if empty entries are allowed, false otherwise.public void setAllowEmptyEntries(boolean allowEmptyEntries)
null values)
to be stored in cache.
setAllowEmptyEntries in interface GridCacheFifoEvictionPolicyMBeanallowEmptyEntries - If false, empty entries will be evicted immediately.public int getCurrentSize()
getCurrentSize in interface GridCacheFifoEvictionPolicyMBeanpublic String getMetaAttributeName()
getMetaAttributeName in interface GridCacheFifoEvictionPolicyMBeanpublic Collection<GridCacheEntry<K,V>> queue()
FIFO queue in proper order.
'FIFO' queue.
public void onEntryAccessed(boolean rmv,
GridCacheEntry<K,V> entry)
onEntryAccessed in interface GridCacheEvictionPolicy<K,V>rmv - True if entry has been removed, false otherwise.entry - Accessed entry.public String toString()
toString in class Object
|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Real Time Big Data
|
|
|