@Deprecated public class RandomEvictionPolicy<K,V> extends Object implements EvictionPolicy<K,V>, RandomEvictionPolicyMBean, Externalizable
getMaxSize() parameter. This implementation is
extremely light weight, lock-free, and does not create any data structures to maintain
any order for eviction.
Random eviction will provide the best performance over any key queue in which every key has the same probability of being accessed.
| Constructor and Description |
|---|
RandomEvictionPolicy()
Deprecated.
Constructs random eviction policy with all defaults.
|
RandomEvictionPolicy(int max)
Deprecated.
Constructs random eviction policy with maximum size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxSize()
Deprecated.
Gets maximum allowed size of cache before entry will start getting evicted.
|
void |
onEntryAccessed(boolean rmv,
EvictableEntry<K,V> entry)
Deprecated.
Callback for whenever entry is accessed.
|
void |
readExternal(ObjectInput in)
Deprecated.
|
void |
setMaxSize(int max)
Deprecated.
Sets maximum allowed size of cache before entry will start getting evicted.
|
String |
toString()
Deprecated.
|
void |
writeExternal(ObjectOutput out)
Deprecated.
|
public RandomEvictionPolicy()
public RandomEvictionPolicy(int max)
max - Maximum allowed size of cache before entry will start getting evicted.public int getMaxSize()
getMaxSize in interface RandomEvictionPolicyMBeanpublic void setMaxSize(int max)
setMaxSize in interface RandomEvictionPolicyMBeanmax - Maximum allowed size of cache before entry will start getting evicted.public void onEntryAccessed(boolean rmv,
EvictableEntry<K,V> entry)
onEntryAccessed in interface EvictionPolicy<K,V>rmv - True if entry has been removed, false otherwise.entry - Accessed entry.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016