/** * {@inheritDoc} */ @Override public CacheExtension createCacheExtension(Ehcache cache, Properties properties) { String replicationScheme = properties.getProperty("scheme"); if (StringUtils.isBlank(replicationScheme)) { throw new CacheException("No scheme specified for distribution"); } if (!replicationScheme.equals("RMI")) { throw new CacheException("The provided scheme " + replicationScheme + " is not supported, only RMI can be used"); } return new DistributionSupportCacheExtension(cache, extractSettings(properties)); }
@Override public CacheExtension clone(Ehcache cache) throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
/** * {@inheritDoc} */ public CacheExtension clone(net.sf.ehcache.Ehcache cache) throws CloneNotSupportedException { throw new CloneNotSupportedException("Cloning is not supported for this CacheExtension"); }
@Override public List<CacheExtension> getRegisteredCacheExtensions() { init(); return super.getRegisteredCacheExtensions(); }
@Override public void registerCacheExtension(CacheExtension cacheExtension) { init(); super.registerCacheExtension(cacheExtension); }
@Override public void unregisterCacheExtension(CacheExtension cacheExtension) { init(); super.unregisterCacheExtension(cacheExtension); }