*
* @return ConcurrentHashMap to be used to modify the data structure
*/
- ConcurrentMap<?, ?> getCache(String containerName, String cacheName);
+ ConcurrentMap<? extends Object, ? extends Object> getCache(String containerName, String cacheName);
/**
* Destroy a cachename given containerName/cachename, if doesn't exist
CacheConfigException {
ConcurrentMap<?, ?> res = this.caches.get(cacheName);
if (res == null) {
- res = new ConcurrentHashMap();
+ res = new ConcurrentHashMap<Object, Object>();
this.caches.put(cacheName, res);
return res;
}
}
}
+ @SuppressWarnings("deprecation") //IGetUpdates intentionally deprecated
public void _unlisten(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
}
public void _dumper(CommandInterpreter ci) {
- ConcurrentMap c;
+ ConcurrentMap<Object, Object> c;
String containerName = ci.nextArgument();
if (containerName == null) {
ci.println("containerName not supplied");
ci.println("Cache not supplied");
return;
}
- c = (ConcurrentMap) this.icluster.getCache(containerName, cacheName);
+ c = (ConcurrentMap<Object, Object>) this.icluster.getCache(containerName, cacheName);
if (c != null) {
- for (Object e : c.entrySet()) {
- Map.Entry entry = (Map.Entry) e;
+ for (Map.Entry<Object, Object> e : c.entrySet()) {
+ Map.Entry<Object, Object> entry = e;
Object v = entry.getValue();
String res = "<NOT KNOWN>";
if (v != null) {
}
}
+ @SuppressWarnings("deprecation") //TODO: remove call to deprecated amIStandby
public void _getRole(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
ci.println("My role is: " + role);
}
+ @SuppressWarnings("deprecation") //TODO: remove call to deprecated getActiveAddres
public void _getActive(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
+ this.icluster.getActiveAddress());
}
+ @SuppressWarnings("deprecation") //TODO: remove use of deprecated listenRoleChange
public void _listenActive(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
ci.println("Register listenRoleChanges");
}
+ @SuppressWarnings("deprecation") //TODO: remove deprecated call to unlistenRoleChange
public void _unlistenActive(CommandInterpreter ci) {
if (this.icluster == null) {
ci.println("\nNo Clustering services available");
}
private class ARPRefreshHandler extends TimerTask {
+ @SuppressWarnings("deprecation")
public void run() {
if ((clusterContainerService != null)
&& !clusterContainerService.amICoordinator()) {
/**
* Private constructor used for JAXB mapping
*/
+ @SuppressWarnings("unused")
private HostNodeConnector() {
}
this.containerName = containerName;
}
+ @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
@Override
public ServiceDependency setService(Class serviceName) {
this.m_dep.setService(serviceName, "(containerName="
return this;
}
+ @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
@Override
public ServiceDependency setService(Class serviceName, String serviceFilter) {
this.m_dep.setService(serviceName, "(&(containerName="
return this;
}
+ @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
@Override
public ServiceDependency setService(Class serviceName,
ServiceReference serviceReference) {
.createCopy(), this.containerName);
}
+ @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
@Override
public Dictionary getProperties() {
return this.m_dep.getProperties();
return this.m_dep.isAutoConfig();
}
+ @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
@Override
public Class getAutoConfigType() {
return this.m_dep.getAutoConfigType();
* surround.
*/
public static final class NodeIDType {
- private static final ConcurrentHashMap<String, Class> compatibleType =
- new ConcurrentHashMap<String, Class>();
+ private static final ConcurrentHashMap<String, Class<? extends Object>> compatibleType =
+ new ConcurrentHashMap<String, Class<? extends Object>>();
/**
* Identifier for an OpenFlow node
*/
* @return true if registered, false otherwise
*/
public static boolean registerIDType(String type,
- Class compatibleID) {
+ Class<? extends Object> compatibleID) {
if (compatibleType.get(type) != null) {
return false;
} else {
*/
public static class NodeConnectorIDType {
private static final
- ConcurrentHashMap<String, ImmutablePair<Class, String>> compatibleType =
- new ConcurrentHashMap<String, ImmutablePair<Class, String>>();
+ ConcurrentHashMap<String, ImmutablePair<Class<? extends Object>, String>> compatibleType =
+ new ConcurrentHashMap<String, ImmutablePair<Class<? extends Object>, String>>();
/**
* Represent a special port pointing toward the controller,
* this is to send data packets toward the controller from
* @return true if registered, false otherwise
*/
public static boolean registerIDType(String type,
- Class compatibleID,
+ Class<? extends Object> compatibleID,
String compatibleNode) {
if (compatibleType.get(type) != null) {
return false;
}
}
- CircleLayout layout = new CircleLayout(graph);
+ CircleLayout<String,String> layout = new CircleLayout<String,String>(graph);
layout.setSize(new Dimension(1200, 365));
for (Map.Entry<String, Map<String, Object>> v : newNodes.entrySet()) {
Double x = layout.transform(v.getKey()).getX();