public class AllInCacheSpaceEvictionStrategy extends SpaceEvictionStrategy
Constructor and Description |
---|
AllInCacheSpaceEvictionStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
evict(int numOfEntries)
Called when the space requires entries to be evicted.
|
boolean |
requiresConcurrencyProtection()
Due to the nature of the system, calls to
SpaceEvictionStrategy.onRemove(EvictableServerEntry) can occur
in concurrent with either SpaceEvictionStrategy.onRead(EvictableServerEntry) or SpaceEvictionStrategy.onUpdate(EvictableServerEntry) or even before them. |
close, getEvictionConfig, getEvictionManager, initialize, isClosed, onInsert, onLoad, onRead, onRemove, onUpdate
public boolean requiresConcurrencyProtection()
SpaceEvictionStrategy
SpaceEvictionStrategy.onRemove(EvictableServerEntry)
can occur
in concurrent with either SpaceEvictionStrategy.onRead(EvictableServerEntry)
or SpaceEvictionStrategy.onUpdate(EvictableServerEntry)
or even before them. In order to prevent this behavior this
property should return true (This is the default) and the system will guard this with locks.
This should only be set to false by advanced usages which needs to be able to work under this
behavior.requiresConcurrencyProtection
in class SpaceEvictionStrategy
public int evict(int numOfEntries)
SpaceEvictionStrategy
evict
in class SpaceEvictionStrategy
numOfEntries
- Number of entries to be evictedCopyright © GigaSpaces.