X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fforwardingrulesmanager%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fforwardingrulesmanager%2Finternal%2FForwardingRulesManager.java;h=e7a8a8e22cf9b2c4826d33bcd2450253f7d59794;hp=836c12749f0b94c6cce567910f60b5f0af797d81;hb=4ca5ea31c027f33cd4c8c84adece356c354c1c3a;hpb=89f53da1dd72537642e2901ffb3be57cd28b1397 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) { }