+ @Override
+ public void entryDeleted(ConfigurationEvent key, String cacheName,
+ boolean originLocal) {
+ if (originLocal) return;
+ }
+
+ @SuppressWarnings("deprecation")
+ private void allocateCache() {
+ if (this.clusterServices == null) {
+ logger.error("uninitialized clusterServices, can't create cache");
+ return;
+ }
+ try {
+ this.clusterServices.createCache("config.event.save",
+ EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL));
+ } catch (CacheConfigException cce) {
+ logger.error("Error creating Configuration cache ", cce);
+ } catch (CacheExistException cce) {
+ logger.error("Configuration Cache already exists, destroy and recreate ", cce);
+ }
+ }
+
+ @SuppressWarnings({ "unchecked", "deprecation" })
+ private void retrieveCache() {
+ if (this.clusterServices == null) {
+ logger.error("uninitialized clusterServices, can't retrieve cache");
+ return;
+ }
+ configEvent = (ConcurrentMap<ConfigurationEvent, String>) this.clusterServices.getCache("config.event.save");
+ if (configEvent == null) {
+ logger.error("Failed to retrieve configuration Cache");
+ }
+ }