Address StackOverflow by offloading cache listener to a separate thread

In addition,
- Address Thomas' comment in gerrit #20442
- Clean up redundant code

Change-Id: Iafb20895d3b338431c7faf9b810b6a6f6b055d92
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjQueueKey.java b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjQueueKey.java
index 8ec1bce3..acf09b0 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjQueueKey.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/FilteringObjQueueKey.java
@@ -24,7 +24,7 @@
 /**
  * Filtering objective queue key.
  */
-public class FilteringObjQueueKey {
+public class FilteringObjQueueKey implements ObjectiveQueueKey {
     private DeviceId deviceId;
     private int priority;
     private Criterion key;
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjQueueKey.java b/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjQueueKey.java
index d963d8a..fa0c1a4 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjQueueKey.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/ForwardingObjQueueKey.java
@@ -24,7 +24,7 @@
 /**
  * Forwarding objective queue key.
  */
-public class ForwardingObjQueueKey {
+public class ForwardingObjQueueKey implements ObjectiveQueueKey {
     private DeviceId deviceId;
     private int priority;
     private TrafficSelector selector;
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjQueueKey.java b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjQueueKey.java
index a2d9c64..b49238f 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjQueueKey.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/NextObjQueueKey.java
@@ -23,7 +23,7 @@
 /**
  * Next objective queue key.
  */
-public class NextObjQueueKey {
+public class NextObjQueueKey implements ObjectiveQueueKey {
     private DeviceId deviceId;
     private int id;
 
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/ObjectiveQueueKey.java b/core/api/src/main/java/org/onosproject/net/flowobjective/ObjectiveQueueKey.java
new file mode 100644
index 0000000..30bcea0
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/ObjectiveQueueKey.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.net.flowobjective;
+
+/**
+ * Objective queue key.
+ */
+public interface ObjectiveQueueKey {
+
+}