Implements accumulation of the fwdobjectives in ofdpa pipelines

Change-Id: I95cbdd9b3fb8d439003a103111a01dc3aee2072b
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
index b3494bd..6f497e7 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/Pipeliner.java
@@ -29,6 +29,16 @@
 public interface Pipeliner extends HandlerBehaviour {
 
     /**
+     * Accumulator enabled property. Determines whether the accumulator is enabled.
+     * The accumulator is assumed to be disabled if this property is undefined.
+     *
+     * If enabled, the pipeliner will try to accumulate objectives and create
+     * batches of flow rules when possible.
+     *
+     */
+    String ACCUMULATOR_ENABLED = "accumulatorEnabled";
+
+    /**
      * Initializes the driver with context required for its operation.
      *
      * @param deviceId the deviceId
@@ -70,4 +80,5 @@
      *          an empty list if no groups were created
      */
     List<String> getNextMappings(NextGroup nextGroup);
+
 }
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/PipelinerContext.java b/core/api/src/main/java/org/onosproject/net/behaviour/PipelinerContext.java
index d539e6e..5c7ddd1 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/PipelinerContext.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/PipelinerContext.java
@@ -38,4 +38,32 @@
     FlowObjectiveStore store();
 
     // TODO: add means to store and access shared state
+
+    /**
+     * Returns the maximum number of objectives to accumulate before processing is triggered.
+     *
+     * @return the maximum number of objectives. -1 if the method is not implemented.
+     */
+    default int accumulatorMaxObjectives() {
+        return -1;
+    }
+
+    /**
+     * Returns the maximum number of millis between objectives before processing is triggered.
+     *
+     * @return the maximum number of millis between objectives. -1 if the method is not implemented.
+     */
+    default int accumulatorMaxIdleMillis() {
+        return -1;
+    }
+
+    /**
+     * Returns the maximum number of millis allowed since the first objective before processing is triggered.
+     *
+     * @return the maximum number of millis allowed since the first objective. -1 if the method is not implemented.
+     */
+    default int accumulatorMaxBatchMillis() {
+        return -1;
+    }
+
 }