public abstract class TimeBasedSpaceEvictionStrategy extends SpaceEvictionStrategy
Modifier and Type | Class and Description |
---|---|
static class |
TimeBasedSpaceEvictionStrategy.TimeBasedEvictionPayload |
Constructor and Description |
---|
TimeBasedSpaceEvictionStrategy(long inCacheTimeInterval,
long inCacheReinsertedTimeInterval,
long harvestMainInterval,
long harvestShortLivedInterval) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Called when the space is closed.
|
int |
evict(int numOfEntries)
Called when the space requires entries to be evicted.
|
void |
initialize(SpaceEvictionManager evictionManager,
SpaceEvictionStrategyConfig config)
Called during the space initialization.
|
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 |
onRemove(EvictableServerEntry entry)
Called when an entry is removed from the space.
|
getEvictionConfig, getEvictionManager, isClosed, onRead, onUpdate, requiresConcurrencyProtection
public TimeBasedSpaceEvictionStrategy(long inCacheTimeInterval, long inCacheReinsertedTimeInterval, long harvestMainInterval, long harvestShortLivedInterval)
public void initialize(SpaceEvictionManager evictionManager, SpaceEvictionStrategyConfig config)
SpaceEvictionStrategy
initialize
in class SpaceEvictionStrategy
public void close()
SpaceEvictionStrategy
close
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 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.