* @see AbstractCacheModelParser#doParseFlushingModel(Element, boolean)
*/
protected FlushingModel doParseFlushingModel(Element element,
boolean flushBeforeMethodExecution) {
JcsFlushingModel model = new JcsFlushingModel();
List cacheElements = DomUtils.getChildElementsByTagName(element, "cache");
if (!CollectionUtils.isEmpty(cacheElements)) {
int count = cacheElements.size();
CacheStruct[] cacheStructs = new CacheStruct[count];
for (int i = 0; i < count; i++) {
Element cacheElement = (Element) cacheElements.get(i);
String cacheName = cacheElement.getAttribute("name");
String groups = cacheElement.getAttribute("groups");
CacheStruct cache = new CacheStruct(cacheName, groups);
cacheStructs[i] = cache;
}
model.setCacheStructs(cacheStructs);
}
model.setFlushBeforeMethodExecution(flushBeforeMethodExecution);
return model;
}