use of org.apache.geode.cache.EvictionAction in project geode by apache.
the class CacheXmlParser method startLRUMemorySize.
/**
* Start the configuration of a <code>lru-memory-size</code> eviction controller. Allow for any of
* the attributes to be missing. Store the attributes on the stack anticipating the declaration of
* an {@link ObjectSizer}.
*
* @param atts
*/
private void startLRUMemorySize(Attributes atts) {
String lruAction = atts.getValue(ACTION);
EvictionAction action = EvictionAction.DEFAULT_EVICTION_ACTION;
if (lruAction != null) {
action = EvictionAction.parseAction(lruAction);
}
String maximum = atts.getValue(MAXIMUM);
int max = MemLRUCapacityController.DEFAULT_MAXIMUM_MEGABYTES;
if (maximum != null) {
max = parseInt(maximum);
}
// Store for later addition of ObjectSizer, if any (the cast is for clarity sake)
stack.push(EvictionAttributes.createLRUMemoryAttributes(max, null, action));
}
Aggregations