Refactor: Use Duration instead of primitive value

Change-Id: Id7de939fd8f1c74cf669207edf16378019b2acc3
diff --git a/core/store/dist/src/main/java/org/onosproject/store/service/impl/ClusterMessagingProtocolClient.java b/core/store/dist/src/main/java/org/onosproject/store/service/impl/ClusterMessagingProtocolClient.java
index 2f69934..b796ccd 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/service/impl/ClusterMessagingProtocolClient.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/service/impl/ClusterMessagingProtocolClient.java
@@ -22,6 +22,7 @@
 import static java.util.concurrent.Executors.newCachedThreadPool;
 
 import java.io.IOException;
+import java.time.Duration;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
@@ -54,7 +55,7 @@
 
     private final Logger log = getLogger(getClass());
 
-    public static final long RETRY_INTERVAL_MILLIS = 2000;
+    public static final Duration RETRY_INTERVAL = Duration.ofMillis(2000);
 
     private final ClusterService clusterService;
     private final ClusterCommunicationService clusterCommunicator;
@@ -179,7 +180,7 @@
                 }
                 byte[] response = clusterCommunicator
                     .sendAndReceive(message, remoteNode.id())
-                    .get(RETRY_INTERVAL_MILLIS, TimeUnit.MILLISECONDS);
+                    .get(RETRY_INTERVAL.toMillis(), TimeUnit.MILLISECONDS);
                 if (!connectionOK.getAndSet(true)) {
                     log.info("Connectivity to {} restored", remoteNode);
                 }