public class ConcurrentLruSpaceEvictionStrategy extends SpaceEvictionStrategy
Constructor and Description |
---|
ConcurrentLruSpaceEvictionStrategy(int touchThreshold,
int maxCacheSize) |
Modifier and Type | Method and Description |
---|---|
int |
evict(int numOfEntries)
Called when the space requires entries to be evicted.
|
void |
onInsert(EvictableServerEntry entry)
Called when a new entry is written to the space.
|
void |
onLoad(EvictableServerEntry entry)
Called when an entry is loaded into the space from an external data source.
|
void |
onRead(EvictableServerEntry entry)
Called when an entry is read from the space.
|
void |
onRemove(EvictableServerEntry entry)
Called when an entry is removed from the space.
|
void |
onUpdate(EvictableServerEntry entry)
Called when an entry is updated in the space.
|
boolean |
requiresConcurrencyProtection()
Determines whether this eviction strategy implementation requires concurrency protection from
the space.
|
close, getEvictionConfig, getEvictionManager, initialize, isClosed
public ConcurrentLruSpaceEvictionStrategy(int touchThreshold, int maxCacheSize)
public boolean requiresConcurrencyProtection()
requiresConcurrencyProtection
in class SpaceEvictionStrategy
public void onInsert(EvictableServerEntry entry)
SpaceEvictionStrategy
onInsert
in class SpaceEvictionStrategy
entry
- The new entrypublic void onLoad(EvictableServerEntry entry)
SpaceEvictionStrategy
onLoad
in class SpaceEvictionStrategy
entry
- The loaded entrypublic void onRead(EvictableServerEntry entry)
SpaceEvictionStrategy
onRead
in class SpaceEvictionStrategy
entry
- The read entrypublic void onUpdate(EvictableServerEntry entry)
SpaceEvictionStrategy
onUpdate
in class SpaceEvictionStrategy
entry
- The updated entrypublic void onRemove(EvictableServerEntry entry)
SpaceEvictionStrategy
onRemove
in class SpaceEvictionStrategy
entry
- The removed entrypublic int evict(int numOfEntries)
SpaceEvictionStrategy
evict
in class SpaceEvictionStrategy
numOfEntries
- Number of entries to be evictedCopyright © GigaSpaces.