From: Madhu Venugopal Date: Fri, 16 Aug 2013 14:26:28 +0000 (-0700) Subject: Migrating caches to TRANSACTIONAL Caches and enabled use1PcForAutoCommitTransactions. X-Git-Tag: releasepom-0.1.0~200^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=4ca5ea31c027f33cd4c8c84adece356c354c1c3a Migrating caches to TRANSACTIONAL Caches and enabled use1PcForAutoCommitTransactions. In addition, - Removed all the unused Caches (especially the save event cache). - Changed ARP Handler's ICacheUpdateAware processing to not process the cache event in its own thread (instead of the infinispan's thread). Change-Id: I608aecd425d0394ba9c4e665424c82790bb874ca Signed-off-by: Madhu Venugopal --- diff --git a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPCacheEvent.java b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPCacheEvent.java new file mode 100644 index 0000000000..e7b342fb7f --- /dev/null +++ b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPCacheEvent.java @@ -0,0 +1,62 @@ + +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.arphandler; + +public class ARPCacheEvent { + private ARPEvent event; + private boolean newReply; + + public ARPCacheEvent(ARPEvent event, boolean newReply) { + super(); + this.event = event; + this.newReply = newReply; + } + + public ARPEvent getEvent() { + return event; + } + + public boolean isNewReply() { + return newReply; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((event == null) ? 0 : event.hashCode()); + result = prime * result + (newReply ? 1231 : 1237); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ARPCacheEvent other = (ARPCacheEvent) obj; + if (event == null) { + if (other.event != null) + return false; + } else if (!event.equals(other.event)) + return false; + if (newReply != other.newReply) + return false; + return true; + } + + @Override + public String toString() { + return "ARPCacheEvent [event=" + event + ", newReply=" + newReply + "]"; + } +} diff --git a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java index 0ff1cd9bd6..f3b22c75d8 100644 --- a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java +++ b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java @@ -21,10 +21,13 @@ import java.util.HashSet; import java.util.Set; import java.util.Timer; import java.util.TimerTask; +import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.LinkedBlockingQueue; +import org.opendaylight.controller.arphandler.ARPCacheEvent; import org.opendaylight.controller.arphandler.ARPEvent; import org.opendaylight.controller.arphandler.ARPReply; import org.opendaylight.controller.arphandler.ARPRequest; @@ -49,6 +52,7 @@ import org.opendaylight.controller.sal.packet.IPv4; import org.opendaylight.controller.sal.packet.Packet; import org.opendaylight.controller.sal.packet.PacketResult; import org.opendaylight.controller.sal.packet.RawPacket; +import org.opendaylight.controller.sal.topology.TopoEdgeUpdate; import org.opendaylight.controller.sal.utils.EtherTypes; import org.opendaylight.controller.sal.utils.HexEncode; import org.opendaylight.controller.sal.utils.NetUtils; @@ -71,6 +75,8 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA private ConcurrentMap> arpRequestors; private ConcurrentMap countDownTimers; private Timer periodicTimer; + private BlockingQueue ARPCacheEvents = new LinkedBlockingQueue(); + Thread cacheEventHandler; /* * A cluster allocated cache. Used for synchronizing ARP request/reply * events across all cluster controllers. To raise an event, we put() a specific @@ -504,6 +510,7 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA void init() { arpRequestors = new ConcurrentHashMap>(); countDownTimers = new ConcurrentHashMap(); + cacheEventHandler = new Thread(new ARPCacheEventHandler(), "ARPCacheEventHandler Thread"); allocateCaches(); retrieveCaches(); @@ -536,7 +543,7 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA try{ clusterContainerService.createCache(ARP_EVENT_CACHE_NAME, - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException e){ log.error("ARPHandler cache configuration invalid!"); } catch (CacheExistException e){ @@ -565,6 +572,8 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA */ void start() { startPeriodicTimer(); + cacheEventHandler.start(); + } /** @@ -687,31 +696,7 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA @Override public void entryUpdated(ARPEvent key, Boolean new_value, String cacheName, boolean originLocal) { - if (key instanceof ARPRequest) { - ARPRequest req = (ARPRequest) key; - // If broadcast request - if (req.getHost() == null) { - sendBcastARPRequest(req.getTargetIP(), req.getSubnet()); - - //If unicast and local, send reply - } else if (connectionManager.isLocal(req.getHost().getnodeconnectorNode())) { - sendUcastARPRequest(req.getHost(), req.getSubnet()); - } - } else if (key instanceof ARPReply) { - ARPReply rep = (ARPReply) key; - // New reply received by controller, notify all awaiting requestors across the cluster - if (new_value) { - generateAndSendReply(rep.getTargetIP(), rep.getTargetMac()); - - // Otherwise, a specific reply. If local, send out. - } else if (connectionManager.isLocal(rep.getPort().getNode())) { - sendARPReply(rep.getPort(), - rep.getSourceMac(), - rep.getSourceIP(), - rep.getTargetMac(), - rep.getTargetIP()); - } - } + enqueueARPCacheEvent(key, new_value); } @Override @@ -722,4 +707,58 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA public void entryDeleted(ARPEvent key, String cacheName, boolean originLocal) { // nothing to do } + + private void enqueueARPCacheEvent (ARPEvent event, boolean new_value) { + try { + ARPCacheEvent cacheEvent = new ARPCacheEvent(event, new_value); + if (!ARPCacheEvents.contains(cacheEvent)) { + this.ARPCacheEvents.add(cacheEvent); + } + } catch (Exception e) { + log.debug("enqueueARPCacheEvent caught Interrupt Exception for event {}", event); + } + } + + /* + * this thread monitors the connectionEvent queue for new incoming events from + */ + private class ARPCacheEventHandler implements Runnable { + @Override + public void run() { + while (true) { + try { + ARPCacheEvent ev = ARPCacheEvents.take(); + ARPEvent event = ev.getEvent(); + if (event instanceof ARPRequest) { + ARPRequest req = (ARPRequest) event; + // If broadcast request + if (req.getHost() == null) { + sendBcastARPRequest(req.getTargetIP(), req.getSubnet()); + + //If unicast and local, send reply + } else if (connectionManager.isLocal(req.getHost().getnodeconnectorNode())) { + sendUcastARPRequest(req.getHost(), req.getSubnet()); + } + } else if (event instanceof ARPReply) { + ARPReply rep = (ARPReply) event; + // New reply received by controller, notify all awaiting requestors across the cluster + if (ev.isNewReply()) { + generateAndSendReply(rep.getTargetIP(), rep.getTargetMac()); + + // Otherwise, a specific reply. If local, send out. + } else if (connectionManager.isLocal(rep.getPort().getNode())) { + sendARPReply(rep.getPort(), + rep.getSourceMac(), + rep.getSourceIP(), + rep.getTargetMac(), + rep.getTargetIP()); + } + } + } catch (InterruptedException e) { + ARPCacheEvents.clear(); + return; + } + } + } + } } diff --git a/opendaylight/clustering/services_implementation/src/main/resources/config/infinispan-config.xml b/opendaylight/clustering/services_implementation/src/main/resources/config/infinispan-config.xml index e917eea825..ff6f99cb4b 100644 --- a/opendaylight/clustering/services_implementation/src/main/resources/config/infinispan-config.xml +++ b/opendaylight/clustering/services_implementation/src/main/resources/config/infinispan-config.xml @@ -28,7 +28,7 @@ syncRollbackPhase="true" syncCommitPhase="true" cacheStopTimeout="30000" - use1PcForAutoCommitTransactions="false" + use1PcForAutoCommitTransactions="true" autoCommit="true" lockingMode="OPTIMISTIC" useSynchronization="true" diff --git a/opendaylight/configuration/implementation/src/main/java/org/opendaylight/controller/configuration/internal/ConfigurationImpl.java b/opendaylight/configuration/implementation/src/main/java/org/opendaylight/controller/configuration/internal/ConfigurationImpl.java index 8e2741e7d1..fa81ee026a 100644 --- a/opendaylight/configuration/implementation/src/main/java/org/opendaylight/controller/configuration/internal/ConfigurationImpl.java +++ b/opendaylight/configuration/implementation/src/main/java/org/opendaylight/controller/configuration/internal/ConfigurationImpl.java @@ -145,7 +145,7 @@ public class ConfigurationImpl implements IConfigurationService, ICacheUpdateAwa } try { this.clusterServices.createCache("config.event.save", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException cce) { logger.error("Error creating Configuration cache ", cce); } catch (CacheExistException cce) { diff --git a/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java b/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java index 6b20909a87..d93f74b4fe 100644 --- a/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java +++ b/opendaylight/connectionmanager/implementation/src/main/java/org/opendaylight/controller/connectionmanager/scheme/AbstractScheme.java @@ -75,6 +75,7 @@ public abstract class AbstractScheme { @SuppressWarnings("deprecation") public void handleClusterViewChanged() { + log.debug("Handling Cluster View changed notification"); List controllers = clusterServices.getClusteredControllers(); ConcurrentMap > controllerNodesMap = getControllerToNodesMap(); List toRemove = new ArrayList(); @@ -103,8 +104,8 @@ public abstract class AbstractScheme { clusterServices.tcommit(); } } catch (Exception e) { - log.error("Exception in replacing nodeConnections ", e); - retry = false; + log.debug("Exception in replacing nodeConnections ", e); + retry = true; try { clusterServices.trollback(); } catch (Exception e1) {} @@ -115,10 +116,8 @@ public abstract class AbstractScheme { } if (retry) { try { - Thread.sleep(100); - } catch (InterruptedException e) { - e.printStackTrace(); - } + Thread.sleep(1000); + } catch (InterruptedException e) {} handleClusterViewChanged(); } } diff --git a/opendaylight/distribution/opendaylight/opendaylight-application.launch b/opendaylight/distribution/opendaylight/opendaylight-application.launch index 5de9baee2f..78737f58df 100644 --- a/opendaylight/distribution/opendaylight/opendaylight-application.launch +++ b/opendaylight/distribution/opendaylight/opendaylight-application.launch @@ -7,7 +7,7 @@ - + diff --git a/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/Activator.java b/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/Activator.java index 37f3873480..a439753748 100644 --- a/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/Activator.java +++ b/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/Activator.java @@ -21,7 +21,6 @@ import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; import org.opendaylight.controller.hosttracker.IfIptoHost; @@ -79,16 +78,10 @@ public class Activator extends ComponentActivatorAbstractBase { */ public void configureInstance(Component c, Object imp, String containerName) { if (imp.equals(StaticRoutingImplementation.class)) { - Dictionary> props = new Hashtable>(); - Set propSet = new HashSet(); - propSet.add("forwarding.staticrouting.configSaveEvent"); - props.put("cachenames", propSet); - // export the service - - c.setInterface(new String[] { ICacheUpdateAware.class.getName(), + c.setInterface(new String[] { IForwardingStaticRouting.class.getName(), IfNewHostNotify.class.getName(), - IConfigurationContainerAware.class.getName() }, props); + IConfigurationContainerAware.class.getName() }, null); c.add(createContainerServiceDependency(containerName).setService( IClusterContainerServices.class).setCallbacks( diff --git a/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/StaticRoutingImplementation.java b/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/StaticRoutingImplementation.java index bccdea4162..ec6da38769 100644 --- a/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/StaticRoutingImplementation.java +++ b/opendaylight/forwarding/staticrouting/src/main/java/org/opendaylight/controller/forwarding/staticrouting/internal/StaticRoutingImplementation.java @@ -36,7 +36,6 @@ import java.util.regex.Pattern; import org.apache.felix.dm.Component; import org.opendaylight.controller.clustering.services.CacheConfigException; import org.opendaylight.controller.clustering.services.CacheExistException; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.clustering.services.IClusterServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; @@ -60,8 +59,7 @@ import org.slf4j.LoggerFactory; * Static Routing feature provides the bridge between SDN and Non-SDN networks. */ public class StaticRoutingImplementation implements IfNewHostNotify, - IForwardingStaticRouting, IObjectReader, IConfigurationContainerAware, - ICacheUpdateAware { + IForwardingStaticRouting, IObjectReader, IConfigurationContainerAware { private static Logger log = LoggerFactory .getLogger(StaticRoutingImplementation.class); private static String ROOT = GlobalConstants.STARTUPHOME.toString(); @@ -71,7 +69,6 @@ public class StaticRoutingImplementation implements IfNewHostNotify, private IfIptoHost hostTracker; private Timer gatewayProbeTimer; private String staticRoutesFileName = null; - private Map configSaveEvent; private IClusterContainerServices clusterContainerService = null; private Set staticRoutingAware = Collections .synchronizedSet(new HashSet()); @@ -134,8 +131,6 @@ public class StaticRoutingImplementation implements IfNewHostNotify, private Status saveConfig() { - // Publish the save config event to the cluster nodes - configSaveEvent.put(new Date().getTime(), SAVE); return saveConfigInternal(); } @@ -165,14 +160,10 @@ public class StaticRoutingImplementation implements IfNewHostNotify, try { clusterContainerService.createCache( "forwarding.staticrouting.routes", EnumSet - .of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + .of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache( "forwarding.staticrouting.configs", EnumSet - .of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); - clusterContainerService.createCache( - "forwarding.staticrouting.configSaveEvent", EnumSet - .of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); - + .of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheExistException cee) { log .error("\nCache already exists - destroy and recreate if needed"); @@ -200,25 +191,6 @@ public class StaticRoutingImplementation implements IfNewHostNotify, if (staticRouteConfigs == null) { log.error("\nFailed to get rulesDB handle"); } - configSaveEvent = (ConcurrentMap) clusterContainerService - .getCache("forwarding.staticrouting.configSaveEvent"); - if (configSaveEvent == null) { - log.error("\nFailed to get cache for configSaveEvent"); - } - } - - @Override - public void entryCreated(Long key, String cacheName, boolean local) { - } - - @Override - public void entryUpdated(Long key, String new_value, String cacheName, - boolean originLocal) { - saveConfigInternal(); - } - - @Override - public void entryDeleted(Long key, String cacheName, boolean originLocal) { } private void notifyStaticRouteUpdate(StaticRoute s, boolean update) { diff --git a/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/Activator.java b/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/Activator.java index b3dae0f97f..bbb9ad7b73 100644 --- a/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/Activator.java +++ b/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/Activator.java @@ -28,7 +28,6 @@ import org.opendaylight.controller.switchmanager.ISwitchManagerAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; public class Activator extends ComponentActivatorAbstractBase { @@ -88,18 +87,14 @@ public class Activator extends ComponentActivatorAbstractBase { public void configureInstance(Component c, Object imp, String containerName) { if (imp.equals(ForwardingRulesManager.class)) { String interfaces[] = null; - Dictionary> props = new Hashtable>(); - Set propSet = new HashSet(); - propSet.add("frm.flowsSaveEvent"); - props.put("cachenames", propSet); // export the service interfaces = new String[] { IContainerListener.class.getName(), ISwitchManagerAware.class.getName(), IForwardingRulesManager.class.getName(), IInventoryListener.class.getName(), - ICacheUpdateAware.class.getName(), IConfigurationContainerAware.class.getName(), + IConfigurationContainerAware.class.getName(), IFlowProgrammerListener.class.getName() }; - c.setInterface(interfaces, props); + c.setInterface(interfaces, null); c.add(createContainerServiceDependency(containerName).setService(IFlowProgrammerService.class) .setCallbacks("setFlowProgrammerService", "unsetFlowProgrammerService").setRequired(true)); diff --git a/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java b/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java index 836c12749f..e7a8a8e22c 100644 --- a/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java +++ b/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java @@ -15,9 +15,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; import java.util.EnumSet; -import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -32,7 +30,6 @@ import org.eclipse.osgi.framework.console.CommandInterpreter; import org.eclipse.osgi.framework.console.CommandProvider; import org.opendaylight.controller.clustering.services.CacheConfigException; import org.opendaylight.controller.clustering.services.CacheExistException; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.clustering.services.IClusterServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; @@ -90,12 +87,10 @@ import org.slf4j.LoggerFactory; */ public class ForwardingRulesManager implements IForwardingRulesManager, PortGroupChangeListener, IContainerListener, ISwitchManagerAware, IConfigurationContainerAware, IInventoryListener, IObjectReader, - ICacheUpdateAware, CommandProvider, IFlowProgrammerListener { - private static final String SAVE = "Save"; + CommandProvider, IFlowProgrammerListener { private static final String NODEDOWN = "Node is Down"; private static final String SUCCESS = StatusCode.SUCCESS.toString(); private static final Logger log = LoggerFactory.getLogger(ForwardingRulesManager.class); - private Map flowsSaveEvent; private String frmFileName; private String portGroupFileName; private ConcurrentMap staticFlows; @@ -980,7 +975,6 @@ public class ForwardingRulesManager implements IForwardingRulesManager, PortGrou portGroupConfigs = new ConcurrentHashMap(); portGroupData = new ConcurrentHashMap>(); staticFlows = new ConcurrentHashMap(); - flowsSaveEvent = new HashMap(); inactiveFlows = new ConcurrentHashMap(); } @@ -1163,37 +1157,37 @@ public class ForwardingRulesManager implements IForwardingRulesManager, PortGrou try { clusterContainerService.createCache("frm.originalSwView", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.installedSwView", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.inactiveFlows", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.nodeFlows", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.groupFlows", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.staticFlows", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.flowsSaveEvent", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.staticFlowsOrdinal", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.portGroupConfigs", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.portGroupData", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("frm.TSPolicies", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException cce) { log.error("CacheConfigException"); @@ -1256,13 +1250,6 @@ public class ForwardingRulesManager implements IForwardingRulesManager, PortGrou log.error("Retrieval of frm.staticFlows cache failed for Container {}", container.getName()); } - map = clusterContainerService.getCache("frm.flowsSaveEvent"); - if (map != null) { - flowsSaveEvent = (ConcurrentMap) map; - } else { - log.error("Retrieval of frm.flowsSaveEvent cache failed for Container {}", container.getName()); - } - map = clusterContainerService.getCache("frm.staticFlowsOrdinal"); if (map != null) { staticFlowsOrdinal = (ConcurrentMap) map; @@ -1820,8 +1807,6 @@ public class ForwardingRulesManager implements IForwardingRulesManager, PortGrou @Override public Status saveConfig() { - // Publish the save config event to the cluster nodes - flowsSaveEvent.put(new Date().getTime(), SAVE); return saveConfigInternal(); } @@ -1841,19 +1826,6 @@ public class ForwardingRulesManager implements IForwardingRulesManager, PortGrou return new Status(StatusCode.SUCCESS, null); } - @Override - public void entryCreated(Long key, String cacheName, boolean local) { - } - - @Override - public void entryUpdated(Long key, String new_value, String cacheName, boolean originLocal) { - saveConfigInternal(); - } - - @Override - public void entryDeleted(Long key, String cacheName, boolean originLocal) { - } - @Override public void subnetNotify(Subnet sub, boolean add) { } diff --git a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java index 4a52590317..fb9378cdd3 100644 --- a/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java +++ b/opendaylight/hosttracker/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/HostTracker.java @@ -181,9 +181,9 @@ public class HostTracker implements IfIptoHost, IfHostListener, ISwitchManagerAw logger.debug("Creating Cache for HostTracker"); try { this.clusterContainerService.createCache(ACTIVE_HOST_CACHE, - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); this.clusterContainerService.createCache(INACTIVE_HOST_CACHE, - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException cce) { logger.error("Cache couldn't be created for HostTracker - check cache mode"); } catch (CacheExistException cce) { diff --git a/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/Activator.java b/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/Activator.java index e25c34c75f..82f37d0235 100644 --- a/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/Activator.java +++ b/opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/Activator.java @@ -23,7 +23,6 @@ import org.opendaylight.controller.sal.routing.IRouting; import org.opendaylight.controller.switchmanager.ISwitchManager; import org.opendaylight.controller.topologymanager.ITopologyManager; import org.opendaylight.controller.topologymanager.ITopologyManagerClusterWideAware; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; public class Activator extends ComponentActivatorAbstractBase { diff --git a/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java b/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java index 7f4c98a648..02b5cffe04 100644 --- a/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java +++ b/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java @@ -158,7 +158,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, try { clusterContainerService.createCache("forwarding.ipswitch.rules", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheExistException cee) { log.error("\nCache already exists - destroy and recreate if needed"); } catch (CacheConfigException cce) { diff --git a/opendaylight/statisticsmanager/implementation/src/main/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManager.java b/opendaylight/statisticsmanager/implementation/src/main/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManager.java index 57dfa91b96..02b6251e9f 100644 --- a/opendaylight/statisticsmanager/implementation/src/main/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManager.java +++ b/opendaylight/statisticsmanager/implementation/src/main/java/org/opendaylight/controller/statisticsmanager/internal/StatisticsManager.java @@ -77,13 +77,13 @@ public class StatisticsManager implements IStatisticsManager, IReadServiceListen try { clusterContainerService.createCache("statisticsmanager.flowStatistics", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("statisticsmanager.nodeConnectorStatistics", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("statisticsmanager.tableStatistics", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("statisticsmanager.descriptionStatistics", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException cce) { log.error("Statistics cache configuration invalid - check cache mode"); diff --git a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java index 0cb55d6555..e81b4cd27e 100644 --- a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java +++ b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java @@ -15,7 +15,6 @@ import java.util.Hashtable; import java.util.Set; import org.apache.felix.dm.Component; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase; @@ -90,16 +89,11 @@ public class Activator extends ComponentActivatorAbstractBase { @Override public void configureInstance(Component c, Object imp, String containerName) { if (imp.equals(SwitchManager.class)) { - Dictionary> props = new Hashtable>(); - Set propSet = new HashSet(); - propSet.add("switchmanager.configSaveEvent"); - props.put("cachenames", propSet); // export the service c.setInterface(new String[] { IListenInventoryUpdates.class.getName(), ISwitchManager.class.getName(), - ICacheUpdateAware.class.getName(), - IConfigurationContainerAware.class.getName() }, props); + IConfigurationContainerAware.class.getName() }, null); // Now lets add a service dependency to make sure the // provider of service exists diff --git a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java index 6bd89a806e..835f40e6c6 100644 --- a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java +++ b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java @@ -16,7 +16,6 @@ import java.net.NetworkInterface; import java.net.SocketException; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; import java.util.Dictionary; import java.util.EnumSet; import java.util.Enumeration; @@ -34,7 +33,6 @@ import org.eclipse.osgi.framework.console.CommandInterpreter; import org.eclipse.osgi.framework.console.CommandProvider; import org.opendaylight.controller.clustering.services.CacheConfigException; import org.opendaylight.controller.clustering.services.CacheExistException; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.clustering.services.IClusterServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; @@ -85,13 +83,10 @@ import org.slf4j.LoggerFactory; * instance per container of the network. All the node/nodeConnector properties * are maintained in the default container only. */ -public class SwitchManager implements ISwitchManager, -IConfigurationContainerAware, IObjectReader, -ICacheUpdateAware, IListenInventoryUpdates, -CommandProvider { +public class SwitchManager implements ISwitchManager, IConfigurationContainerAware, + IObjectReader, IListenInventoryUpdates, CommandProvider { private static Logger log = LoggerFactory.getLogger(SwitchManager.class); private static String ROOT = GlobalConstants.STARTUPHOME.toString(); - private static final String SAVE = "Save"; private String subnetFileName, spanFileName, switchConfigFileName; private final List spanNodeConnectors = new CopyOnWriteArrayList(); // Collection of Subnets keyed by the InetAddress @@ -100,7 +95,6 @@ CommandProvider { private ConcurrentMap spanConfigList; // manually configured parameters for the node such as name, tier, mode private ConcurrentMap nodeConfigList; - private ConcurrentMap configSaveEvent; private ConcurrentMap> nodeProps; private ConcurrentMap> nodeConnectorProps; private ConcurrentMap> nodeConnectorNames; @@ -210,27 +204,27 @@ CommandProvider { try { clusterContainerService.createCache( "switchmanager.subnetsConfigList", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("switchmanager.spanConfigList", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("switchmanager.nodeConfigList", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("switchmanager.subnets", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache( "switchmanager.configSaveEvent", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache("switchmanager.nodeProps", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache( "switchmanager.nodeConnectorProps", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache( "switchmanager.nodeConnectorNames", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterContainerService.createCache( "switchmanager.controllerProps", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException cce) { log.error("\nCache configuration invalid - check cache mode"); } catch (CacheExistException ce) { @@ -269,12 +263,6 @@ CommandProvider { log.error("\nFailed to get cache for subnets"); } - configSaveEvent = (ConcurrentMap) clusterContainerService - .getCache("switchmanager.configSaveEvent"); - if (configSaveEvent == null) { - log.error("\nFailed to get cache for configSaveEvent"); - } - nodeProps = (ConcurrentMap>) clusterContainerService .getCache("switchmanager.nodeProps"); if (nodeProps == null) { @@ -305,7 +293,6 @@ CommandProvider { spanConfigList = new ConcurrentHashMap(); nodeConfigList = new ConcurrentHashMap(); subnets = new ConcurrentHashMap(); - configSaveEvent = new ConcurrentHashMap(); nodeProps = new ConcurrentHashMap>(); nodeConnectorProps = new ConcurrentHashMap>(); nodeConnectorNames = new ConcurrentHashMap>(); @@ -830,8 +817,6 @@ CommandProvider { @Override public Status saveSwitchConfig() { - // Publish the save config event to the cluster nodes - configSaveEvent.put(new Date().getTime(), SAVE); return saveSwitchConfigInternal(); } @@ -906,20 +891,6 @@ CommandProvider { return ncList; } - @Override - public void entryCreated(Long key, String cacheName, boolean local) { - } - - @Override - public void entryUpdated(Long key, String newValue, String cacheName, - boolean originLocal) { - saveSwitchConfigInternal(); - } - - @Override - public void entryDeleted(Long key, String cacheName, boolean originLocal) { - } - private void addNode(Node node, Set props) { log.trace("{} added, props: {}", node, props); if (nodeProps == null) { diff --git a/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java b/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java index 4bd295c62a..004d1b98db 100644 --- a/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java +++ b/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java @@ -192,7 +192,7 @@ public class TopologyManagerImpl implements try { this.edgesDB = (ConcurrentMap>) this.clusterContainerService.createCache(TOPOEDGESDB, - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheExistException cee) { log.debug(TOPOEDGESDB + " Cache already exists - destroy and recreate if needed"); } catch (CacheConfigException cce) { @@ -202,7 +202,7 @@ public class TopologyManagerImpl implements try { this.hostsDB = (ConcurrentMap>>>) this.clusterContainerService.createCache( - TOPOHOSTSDB, EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + TOPOHOSTSDB, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheExistException cee) { log.debug(TOPOHOSTSDB + " Cache already exists - destroy and recreate if needed"); } catch (CacheConfigException cce) { @@ -212,7 +212,7 @@ public class TopologyManagerImpl implements try { this.nodeConnectorsDB = (ConcurrentMap>) this.clusterContainerService.createCache( - TOPONODECONNECTORDB, EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + TOPONODECONNECTORDB, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheExistException cee) { log.debug(TOPONODECONNECTORDB + " Cache already exists - destroy and recreate if needed"); } catch (CacheConfigException cce) { @@ -222,7 +222,7 @@ public class TopologyManagerImpl implements try { this.userLinksDB = (ConcurrentMap) this.clusterContainerService.createCache( - TOPOUSERLINKSDB, EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + TOPOUSERLINKSDB, EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheExistException cee) { log.debug(TOPOUSERLINKSDB + " Cache already exists - destroy and recreate if needed"); } catch (CacheConfigException cce) { diff --git a/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/Activator.java b/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/Activator.java index a1fdce5d58..e54953f697 100644 --- a/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/Activator.java +++ b/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/Activator.java @@ -15,7 +15,6 @@ import java.util.Hashtable; import java.util.Set; import org.apache.felix.dm.Component; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterGlobalServices; import org.opendaylight.controller.configuration.IConfigurationAware; import org.opendaylight.controller.containermanager.IContainerAuthorization; @@ -111,18 +110,11 @@ public class Activator extends ComponentActivatorAbstractBase { */ protected void configureGlobalInstance(Component c, Object imp) { if (imp.equals(UserManagerImpl.class)) { - // export the service - Dictionary> props = new Hashtable>(); - Set propSet = new HashSet(); - propSet.add("usermanager.localUserSaveConfigEvent"); - propSet.add("usermanager.remoteServerSaveConfigEvent"); - propSet.add("usermanager.authorizationSaveConfigEvent"); - props.put("cachenames", propSet); // export the service - c.setInterface(new String[] { ICacheUpdateAware.class.getName(), + c.setInterface(new String[] { IUserManager.class.getName(), - IConfigurationAware.class.getName() }, props); + IConfigurationAware.class.getName() }, null); c.add(createServiceDependency().setService( IClusterGlobalServices.class).setCallbacks( diff --git a/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/UserManagerImpl.java b/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/UserManagerImpl.java index 9d2ad05765..add453f09f 100644 --- a/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/UserManagerImpl.java +++ b/opendaylight/usermanager/implementation/src/main/java/org/opendaylight/controller/usermanager/internal/UserManagerImpl.java @@ -13,7 +13,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; @@ -28,7 +27,6 @@ import org.eclipse.osgi.framework.console.CommandInterpreter; import org.eclipse.osgi.framework.console.CommandProvider; import org.opendaylight.controller.clustering.services.CacheConfigException; import org.opendaylight.controller.clustering.services.CacheExistException; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterGlobalServices; import org.opendaylight.controller.clustering.services.IClusterServices; import org.opendaylight.controller.configuration.IConfigurationAware; @@ -72,8 +70,7 @@ import org.springframework.security.web.context.SecurityContextRepository; * The internal implementation of the User Manager. */ public class UserManagerImpl implements IUserManager, IObjectReader, - IConfigurationAware, ICacheUpdateAware, CommandProvider, - AuthenticationProvider { + IConfigurationAware, CommandProvider, AuthenticationProvider { private static final Logger logger = LoggerFactory .getLogger(UserManagerImpl.class); private static final String defaultAdmin = "admin"; @@ -136,30 +133,30 @@ public class UserManagerImpl implements IUserManager, IObjectReader, try { clusterGlobalService.createCache("usermanager.localUserConfigList", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterGlobalService.createCache( "usermanager.remoteServerConfigList", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterGlobalService.createCache( "usermanager.authorizationConfList", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterGlobalService.createCache("usermanager.activeUsers", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterGlobalService.createCache( "usermanager.localUserSaveConfigEvent", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterGlobalService.createCache( "usermanager.remoteServerSaveConfigEvent", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); clusterGlobalService.createCache( "usermanager.authorizationSaveConfigEvent", - EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL)); + EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL)); } catch (CacheConfigException cce) { logger.error("Cache configuration invalid - check cache mode"); } catch (CacheExistException ce) { @@ -398,8 +395,6 @@ public class UserManagerImpl implements IUserManager, IObjectReader, @Override public Status saveLocalUserList() { - // Publish the save config event to the cluster nodes - localUserListSaveConfigEvent.put(new Date().getTime(), SAVE); return saveLocalUserListInternal(); } @@ -411,8 +406,6 @@ public class UserManagerImpl implements IUserManager, IObjectReader, @Override public Status saveAAAServerList() { - // Publish the save config event to the cluster nodes - remoteServerSaveConfigEvent.put(new Date().getTime(), SAVE); return saveAAAServerListInternal(); } @@ -424,8 +417,6 @@ public class UserManagerImpl implements IUserManager, IObjectReader, @Override public Status saveAuthorizationList() { - // Publish the save config event to the cluster nodes - authorizationSaveConfigEvent.put(new Date().getTime(), SAVE); return saveAuthorizationListInternal(); } @@ -678,36 +669,6 @@ public class UserManagerImpl implements IUserManager, IObjectReader, return loggedInList; } - /* - * Interaction with GUI END - */ - - /* - * Cluster notifications - */ - - @Override - public void entryCreated(Long key, String cacheName, boolean originLocal) { - // don't react on this event - } - - @Override - public void entryUpdated(Long key, String new_value, String cacheName, - boolean originLocal) { - if (cacheName.equals("localUserSaveConfigEvent")) { - this.saveLocalUserListInternal(); - } else if (cacheName.equals("remoteServerSaveConfigEvent")) { - this.saveAAAServerListInternal(); - } else if (cacheName.equals("authorizationSaveConfigEvent")) { - this.saveAuthorizationListInternal(); - } - } - - @Override - public void entryDeleted(Long key, String cacheName, boolean originLocal) { - // don't react on this event - } - public void _umAddUser(CommandInterpreter ci) { String userName = ci.nextArgument(); String password = ci.nextArgument();