public class SwarmCacheProvider implements CacheProvider {
private CacheFactory factory;
public Cache buildCache(String regionName, Properties properties) throws CacheException {
ObjectCache cache = factory.createCache(regionName);
if (cache==null) {
throw new CacheException("SwarmCache did not create a cache: " + regionName);
}
return new SwarmCache(cache, regionName);
}