Scrubbing store related TODO/FIXMEs
Change-Id: I4e6bf026845bbd5be127ecacd9956d12f3386c9e
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
index a376b93..b18462a 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
@@ -98,7 +98,6 @@
import static org.onosproject.store.device.impl.GossipDeviceStoreMessageSubjects.DEVICE_ADVERTISE;
import static org.onosproject.store.device.impl.GossipDeviceStoreMessageSubjects.DEVICE_REMOVE_REQ;
-// TODO: give me a better name
/**
* Manages inventory of infrastructure devices using gossip protocol to distribute
* information.
@@ -167,6 +166,10 @@
private ScheduledExecutorService backgroundExecutor;
+ // TODO make these anti-entropy parameters configurable
+ private long initialDelaySec = 5;
+ private long periodSec = 5;
+
@Activate
public void activate() {
@@ -189,9 +192,6 @@
backgroundExecutor =
newSingleThreadScheduledExecutor(minPriority(namedThreads("device-bg-%d")));
- // TODO: Make these configurable
- long initialDelaySec = 5;
- long periodSec = 5;
// start anti-entropy thread
backgroundExecutor.scheduleAtFixedRate(new SendAdvertisementTask(),
initialDelaySec, periodSec, TimeUnit.SECONDS);
@@ -412,7 +412,6 @@
}
boolean removed = availableDevices.remove(deviceId);
if (removed) {
- // TODO: broadcast ... DOWN only?
return new DeviceEvent(DEVICE_AVAILABILITY_CHANGED, device, null);
}
return null;
@@ -885,7 +884,7 @@
if (e.getKey().equals(primary)) {
continue;
}
- // TODO: should keep track of Description timestamp
+ // Note: should keep track of Description timestamp in the future
// and only merge conflicting keys when timestamp is newer.
// Currently assuming there will never be a key conflict between
// providers
@@ -913,7 +912,6 @@
ProviderId primary = pickPrimaryPID(descsMap);
DeviceDescriptions primDescs = descsMap.get(primary);
// if no primary, assume not enabled
- // TODO: revisit this default port enabled/disabled behavior
boolean isEnabled = false;
DefaultAnnotations annotations = DefaultAnnotations.builder().build();
@@ -927,7 +925,7 @@
if (e.getKey().equals(primary)) {
continue;
}
- // TODO: should keep track of Description timestamp
+ // Note: should keep track of Description timestamp in the future
// and only merge conflicting keys when timestamp is newer.
// Currently assuming there will never be a key conflict between
// providers
@@ -968,7 +966,6 @@
return providerDescs.get(pid);
}
- // TODO: should we be throwing exception?
private void unicastMessage(NodeId recipient, MessageSubject subject, Object event) throws IOException {
ClusterMessage message = new ClusterMessage(
clusterService.getLocalNode().id(),
@@ -977,7 +974,6 @@
clusterCommunicator.unicast(message, recipient);
}
- // TODO: should we be throwing exception?
private void broadcastMessage(MessageSubject subject, Object event) throws IOException {
ClusterMessage message = new ClusterMessage(
clusterService.getLocalNode().id(),