throws InvalidCacheModelException {
JcsFlushingModel model = (JcsFlushingModel) flushingModel;
CacheStruct[] structs = model.getCacheStructs();
if (ObjectUtils.isEmpty(structs)) {
throw new InvalidCacheModelException(
"There should be at least one cache to flush");
}
int structCount = structs.length;
for (int i = 0; i < structCount; i++) {
CacheStruct struct = structs[i];
if (!StringUtils.hasText(struct.getCacheName())) {
throw new InvalidCacheModelException(
"Cache name should not be empty in the struct with index <" + i
+ ">");
}
}
}