[ONOS-6324] Add getOrDefault method to ConsistentMap.

Change-Id: Ice7ad6260c6eb8076320ef469874c0c4ceeadc19
diff --git a/core/api/src/main/java/org/onosproject/store/service/ConsistentMap.java b/core/api/src/main/java/org/onosproject/store/service/ConsistentMap.java
index f5e8c13..3d14a68 100644
--- a/core/api/src/main/java/org/onosproject/store/service/ConsistentMap.java
+++ b/core/api/src/main/java/org/onosproject/store/service/ConsistentMap.java
@@ -77,6 +77,20 @@
     Versioned<V> get(K key);
 
     /**
+     * Returns the value (and version) to which the specified key is mapped, or the provided
+     * default value if this map contains no mapping for the key.
+     * <p>
+     * Note: a non-null {@link Versioned} value will be returned even if the {@code defaultValue}
+     * is {@code null}.
+     *
+     * @param key the key whose associated value (and version) is to be returned
+     * @param defaultValue the default value to return if the key is not set
+     * @return the value (and version) to which the specified key is mapped, or null if
+     * this map contains no mapping for the key
+     */
+    Versioned<V> getOrDefault(K key, V defaultValue);
+
+    /**
      * If the specified key is not already associated with a value (or is mapped to null),
      * attempts to compute its value using the given mapping function and enters it into
      * this map unless null.