Fix fingbug warning FI_PUBLIC_SHOULD_BE_PROTECTED
+ Cosmetic fixes for changes .java
diff --git a/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java b/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java
index 6483121..33091b9 100644
--- a/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java
+++ b/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java
@@ -78,7 +78,7 @@
private IMap<String, byte[]> mapTopology = null;
private MapTopologyListener mapTopologyListener = null;
private String mapTopologyListenerId = null;
-
+
// State related to the ARP map
protected static final String arpMapName = "arpMap";
private IMap<ArpMessage, byte[]> arpMap = null;
@@ -98,8 +98,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryAdded(EntryEvent<Long, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -116,8 +117,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryRemoved(EntryEvent<Long, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -134,8 +136,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryUpdated(EntryEvent<Long, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -152,6 +155,7 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryEvicted(EntryEvent<Long, byte[]> event) {
// NOTE: We don't use eviction for this map
}
@@ -170,8 +174,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryAdded(EntryEvent<Long, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -188,8 +193,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryRemoved(EntryEvent<Long, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -206,8 +212,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryUpdated(EntryEvent<Long, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -224,6 +231,7 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryEvicted(EntryEvent<Long, byte[]> event) {
// NOTE: We don't use eviction for this map
}
@@ -242,8 +250,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryAdded(EntryEvent<String, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -261,8 +270,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryRemoved(EntryEvent<String, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -280,8 +290,9 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryUpdated(EntryEvent<String, byte[]> event) {
- byte[] valueBytes = (byte[])event.getValue();
+ byte[] valueBytes = event.getValue();
//
// Decode the value and deliver the notification
@@ -299,11 +310,12 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryEvicted(EntryEvent<String, byte[]> event) {
// NOTE: We don't use eviction for this map
}
}
-
+
/**
* Class for receiving notifications for ARP requests.
*
@@ -317,11 +329,12 @@
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryAdded(EntryEvent<ArpMessage, byte[]> event) {
for (IArpEventHandler arpEventHandler : arpEventHandlers) {
arpEventHandler.arpRequestNotification(event.getKey());
}
-
+
//
// Decode the value and deliver the notification
//
@@ -334,30 +347,33 @@
flowEventHandlerService.notificationRecvTopologyElementAdded(topologyElement);
*/
}
-
+
/**
* Receive a notification that an entry is removed.
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryRemoved(EntryEvent<ArpMessage, byte[]> event) {
// Not used
}
-
+
/**
* Receive a notification that an entry is updated.
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryUpdated(EntryEvent<ArpMessage, byte[]> event) {
// Not used
}
-
+
/**
* Receive a notification that an entry is evicted.
*
* @param event the notification event for the entry.
*/
+ @Override
public void entryEvicted(EntryEvent<ArpMessage, byte[]> event) {
// Not used
}
@@ -374,7 +390,7 @@
System.setProperty("hazelcast.socket.send.buffer.size", "32");
*/
// System.setProperty("hazelcast.heartbeat.interval.seconds", "100");
-
+
// Init from configuration file
try {
hazelcastConfig = new FileSystemXmlConfig(configFilename);
@@ -395,7 +411,8 @@
/**
* Shutdown the Hazelcast Datagrid operation.
*/
- public void finalize() {
+ @Override
+ protected void finalize() {
close();
}
@@ -413,7 +430,7 @@
*/
@Override
public Collection<Class<? extends IFloodlightService>> getModuleServices() {
- Collection<Class<? extends IFloodlightService>> l =
+ Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IDatagridService.class);
return l;
@@ -425,10 +442,10 @@
* @return the collection of implemented services.
*/
@Override
- public Map<Class<? extends IFloodlightService>, IFloodlightService>
+ public Map<Class<? extends IFloodlightService>, IFloodlightService>
getServiceImpls() {
Map<Class<? extends IFloodlightService>,
- IFloodlightService> m =
+ IFloodlightService> m =
new HashMap<Class<? extends IFloodlightService>,
IFloodlightService>();
m.put(IDatagridService.class, this);
@@ -441,7 +458,7 @@
* @return the collection of modules this module depends on.
*/
@Override
- public Collection<Class<? extends IFloodlightService>>
+ public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
@@ -477,7 +494,7 @@
hazelcastInstance = Hazelcast.newHazelcastInstance(hazelcastConfig);
restApi.addRestletRoutable(new DatagridWebRoutable());
-
+
arpMap = hazelcastInstance.getMap(arpMapName);
arpMap.addEntryListener(new ArpMapListener(), true);
}
@@ -538,19 +555,19 @@
this.flowEventHandlerService = null;
}
-
+
@Override
public void registerArpEventHandler(IArpEventHandler arpEventHandler) {
if (arpEventHandler != null) {
arpEventHandlers.add(arpEventHandler);
}
}
-
+
@Override
public void deregisterArpEventHandler(IArpEventHandler arpEventHandler) {
arpEventHandlers.remove(arpEventHandler);
}
-
+
/**
* Get all Flows that are currently in the datagrid.
*
@@ -883,7 +900,7 @@
mapTopology.removeAsync(key);
}
}
-
+
@Override
public void sendArpRequest(ArpMessage arpMessage) {
//log.debug("ARP bytes: {}", HexString.toHexString(arpRequest));