diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 8a7aae9..f473cce 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -55,7 +55,6 @@
 import org.onosproject.store.service.EventuallyConsistentMapBuilder;
 import org.onosproject.store.service.StorageService;
 import org.onosproject.store.service.WallClockTimestamp;
-import org.onosproject.store.service.WallclockClockManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -171,7 +170,7 @@
         nsNextObjStore = nsNextObjMapBuilder
                 .withName("nsnextobjectivestore")
                 .withSerializer(kryoBuilder)
-                .withClockService(new WallclockClockManager<>())
+                .withTimestampProvider((k, v) -> new WallClockTimestamp())
                 .build();
         log.trace("Current size {}", nsNextObjStore.size());
 
@@ -181,7 +180,7 @@
         tunnelStore = tunnelMapBuilder
                 .withName("tunnelstore")
                 .withSerializer(kryoBuilder)
-                .withClockService(new WallclockClockManager<>())
+                .withTimestampProvider((k, v) -> new WallClockTimestamp())
                 .build();
 
         EventuallyConsistentMapBuilder<String, Policy> policyMapBuilder =
@@ -190,7 +189,7 @@
         policyStore = policyMapBuilder
                 .withName("policystore")
                 .withSerializer(kryoBuilder)
-                .withClockService(new WallclockClockManager<>())
+                .withTimestampProvider((k, v) -> new WallClockTimestamp())
                 .build();
 
         networkConfigService.init();
diff --git a/core/api/src/main/java/org/onosproject/store/service/ClockService.java b/core/api/src/main/java/org/onosproject/store/service/ClockService.java
deleted file mode 100644
index 12ce688..0000000
--- a/core/api/src/main/java/org/onosproject/store/service/ClockService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * 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.store.service;
-
-import org.onosproject.store.Timestamp;
-
-/**
- * Clock service that can generate timestamps based off of two input objects.
- * Implementations are free to only take one or none of the objects into account
- * when generating timestamps.
- */
-public interface ClockService<T, U> {
-
-    /**
-     * Gets a new timestamp for the given objects.
-     *
-     * @param object1 First object to use when generating timestamps
-     * @param object2 Second object to use when generating timestamps
-     * @return the new timestamp
-     */
-    Timestamp getTimestamp(T object1, U object2);
-}
diff --git a/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMap.java b/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMap.java
index 84b515c..b57cc5f 100644
--- a/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMap.java
+++ b/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMap.java
@@ -114,7 +114,7 @@
      * Removes the given key-value mapping from the map, if it exists.
      * <p>
      * This actually means remove any values up to and including the timestamp
-     * given by {@link org.onosproject.store.service.ClockService#getTimestamp(Object, Object)}.
+     * given by the map's timestampProvider.
      * Any mappings that produce an earlier timestamp than this given key-value
      * pair will be removed, and any mappings that produce a later timestamp
      * will supersede this remove.
diff --git a/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMapBuilder.java b/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMapBuilder.java
index c3abb4e..9471321 100644
--- a/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMapBuilder.java
+++ b/core/api/src/main/java/org/onosproject/store/service/EventuallyConsistentMapBuilder.java
@@ -18,6 +18,7 @@
 
 import org.onlab.util.KryoNamespace;
 import org.onosproject.cluster.NodeId;
+import org.onosproject.store.Timestamp;
 
 import java.util.Collection;
 import java.util.concurrent.ExecutorService;
@@ -66,10 +67,10 @@
             KryoNamespace.Builder serializerBuilder);
 
     /**
-     * Sets the clock service to use for generating timestamps for map updates.
+     * Sets the function to use for generating timestamps for map updates.
      * <p>
-     * The client must provide an {@link org.onosproject.store.service.ClockService}
-     * which can generate timestamps for a given key. The clock service is free
+     * The client must provide an {@code BiFunction<K, V, Timestamp>}
+     * which can generate timestamps for a given key. The function is free
      * to generate timestamps however it wishes, however these timestamps will
      * be used to serialize updates to the map so they must be strict enough
      * to ensure updates are properly ordered for the use case (i.e. in some
@@ -80,11 +81,11 @@
      * Note: This is a mandatory parameter.
      * </p>
      *
-     * @param clockService clock service
+     * @param timestampProvider provides a new timestamp
      * @return this EventuallyConsistentMapBuilder
      */
-    EventuallyConsistentMapBuilder<K, V> withClockService(
-            ClockService<K, V> clockService);
+    EventuallyConsistentMapBuilder<K, V> withTimestampProvider(
+            BiFunction<K, V, Timestamp> timestampProvider);
 
     /**
      * Sets the executor to use for processing events coming in from peers.
diff --git a/core/api/src/main/java/org/onosproject/store/service/WallclockClockManager.java b/core/api/src/main/java/org/onosproject/store/service/WallclockClockManager.java
deleted file mode 100644
index c2b5ffb..0000000
--- a/core/api/src/main/java/org/onosproject/store/service/WallclockClockManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * 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.store.service;
-
-import org.onosproject.store.Timestamp;
-
-/**
- * A clock service which hands out wallclock-based timestamps.
- */
-public class WallclockClockManager<T, U> implements ClockService<T, U> {
-    @Override
-    public Timestamp getTimestamp(T object1, U object2) {
-        return new WallClockTimestamp();
-    }
-}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
index b6c3b98..3261f33 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/app/GossipApplicationStore.java
@@ -133,13 +133,13 @@
         apps = storageService.<ApplicationId, Application>eventuallyConsistentMapBuilder()
                 .withName("apps")
                 .withSerializer(serializer)
-                .withClockService((k, v) -> clockService.getTimestamp())
+                .withTimestampProvider((k, v) -> clockService.getTimestamp())
                 .build();
 
         states = storageService.<Application, InternalState>eventuallyConsistentMapBuilder()
                 .withName("app-states")
                 .withSerializer(serializer)
-                .withClockService((k, v) -> clockService.getTimestamp())
+                .withTimestampProvider((k, v) -> clockService.getTimestamp())
                 .build();
 
         states.addListener(new InternalAppStatesListener());
@@ -147,7 +147,7 @@
         permissions = storageService.<Application, Set<Permission>>eventuallyConsistentMapBuilder()
                 .withName("app-permissions")
                 .withSerializer(serializer)
-                .withClockService((k, v) -> clockService.getTimestamp())
+                .withTimestampProvider((k, v) -> clockService.getTimestamp())
                 .build();
 
         log.info("Started");
diff --git a/core/store/dist/src/main/java/org/onosproject/store/cfg/GossipComponentConfigStore.java b/core/store/dist/src/main/java/org/onosproject/store/cfg/GossipComponentConfigStore.java
index 8d14b4e..bf99264 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/cfg/GossipComponentConfigStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/cfg/GossipComponentConfigStore.java
@@ -70,7 +70,7 @@
         properties = storageService.<String, String>eventuallyConsistentMapBuilder()
                 .withName("cfg")
                 .withSerializer(serializer)
-                .withClockService((k, v) -> clockService.getTimestamp())
+                .withTimestampProvider((k, v) -> clockService.getTimestamp())
                 .build();
 
         properties.addListener(new InternalPropertiesListener());
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 de6b523..842274a 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
@@ -78,7 +78,6 @@
 import org.onosproject.store.service.MultiValuedTimestamp;
 import org.onosproject.store.service.StorageService;
 import org.onosproject.store.service.WallClockTimestamp;
-import org.onosproject.store.service.WallclockClockManager;
 import org.slf4j.Logger;
 
 import java.io.IOException;
@@ -244,7 +243,7 @@
                 .withName("port-stats")
                 .withSerializer(deviceDataSerializer)
                 .withAntiEntropyPeriod(5, TimeUnit.SECONDS)
-                .withClockService(new WallclockClockManager<>())
+                .withTimestampProvider((k, v) -> new WallClockTimestamp())
                 .withTombstonesDisabled()
                 .build();
         devicePortStats.addListener(portStatsListener);
diff --git a/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapBuilderImpl.java b/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapBuilderImpl.java
index 823f658..a553fff 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapBuilderImpl.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapBuilderImpl.java
@@ -18,8 +18,8 @@
 import org.onlab.util.KryoNamespace;
 import org.onosproject.cluster.ClusterService;
 import org.onosproject.cluster.NodeId;
+import org.onosproject.store.Timestamp;
 import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
-import org.onosproject.store.service.ClockService;
 import org.onosproject.store.service.EventuallyConsistentMap;
 import org.onosproject.store.service.EventuallyConsistentMapBuilder;
 
@@ -45,7 +45,7 @@
     private ExecutorService eventExecutor;
     private ExecutorService communicationExecutor;
     private ScheduledExecutorService backgroundExecutor;
-    private ClockService<K, V> clockService;
+    private BiFunction<K, V, Timestamp> timestampProvider;
     private BiFunction<K, V, Collection<NodeId>> peerUpdateFunction;
     private boolean tombstonesDisabled = false;
     private long antiEntropyPeriod = 5;
@@ -79,9 +79,9 @@
     }
 
     @Override
-    public EventuallyConsistentMapBuilder<K, V> withClockService(
-            ClockService<K, V> clockService) {
-        this.clockService = checkNotNull(clockService);
+    public EventuallyConsistentMapBuilder<K, V> withTimestampProvider(
+            BiFunction<K, V, Timestamp> timestampProvider) {
+        this.timestampProvider = checkNotNull(timestampProvider);
         return this;
     }
 
@@ -141,13 +141,13 @@
     public EventuallyConsistentMap<K, V> build() {
         checkNotNull(name, "name is a mandatory parameter");
         checkNotNull(serializerBuilder, "serializerBuilder is a mandatory parameter");
-        checkNotNull(clockService, "clockService is a mandatory parameter");
+        checkNotNull(timestampProvider, "timestampProvider is a mandatory parameter");
 
         return new EventuallyConsistentMapImpl<>(name,
                                                  clusterService,
                                                  clusterCommunicator,
                                                  serializerBuilder,
-                                                 clockService,
+                                                 timestampProvider,
                                                  peerUpdateFunction,
                                                  eventExecutor,
                                                  communicationExecutor,
diff --git a/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapImpl.java b/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapImpl.java
index 18ecefe..b78b0d3 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapImpl.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/ecmap/EventuallyConsistentMapImpl.java
@@ -37,7 +37,6 @@
 import org.onosproject.store.impl.Timestamped;
 import org.onosproject.store.service.WallClockTimestamp;
 import org.onosproject.store.serializers.KryoSerializer;
-import org.onosproject.store.service.ClockService;
 import org.onosproject.store.service.EventuallyConsistentMap;
 import org.onosproject.store.service.EventuallyConsistentMapEvent;
 import org.onosproject.store.service.EventuallyConsistentMapListener;
@@ -84,7 +83,7 @@
     private final ClusterCommunicationService clusterCommunicator;
     private final KryoSerializer serializer;
 
-    private final ClockService<K, V> clockService;
+    private final BiFunction<K, V, Timestamp> timestampProvider;
 
     private final MessageSubject updateMessageSubject;
     private final MessageSubject antiEntropyAdvertisementSubject;
@@ -130,8 +129,7 @@
      * @param clusterCommunicator   the cluster communications service
      * @param serializerBuilder     a Kryo namespace builder that can serialize
      *                              both K and V
-     * @param clockService          a clock service able to generate timestamps
-     *                              for K and V
+     * @param timestampProvider     provider of timestamps for K and V
      * @param peerUpdateFunction    function that provides a set of nodes to immediately
      *                              update to when there writes to the map
      * @param eventExecutor         executor to use for processing incoming
@@ -150,7 +148,7 @@
                                 ClusterService clusterService,
                                 ClusterCommunicationService clusterCommunicator,
                                 KryoNamespace.Builder serializerBuilder,
-                                ClockService<K, V> clockService,
+                                BiFunction<K, V, Timestamp> timestampProvider,
                                 BiFunction<K, V, Collection<NodeId>> peerUpdateFunction,
                                 ExecutorService eventExecutor,
                                 ExecutorService communicationExecutor,
@@ -170,7 +168,7 @@
 
         this.serializer = createSerializer(serializerBuilder);
 
-        this.clockService = clockService;
+        this.timestampProvider = timestampProvider;
 
         if (peerUpdateFunction != null) {
             this.peerUpdateFunction = peerUpdateFunction;
@@ -302,7 +300,7 @@
         checkNotNull(key, ERROR_NULL_KEY);
         checkNotNull(value, ERROR_NULL_VALUE);
 
-        Timestamp timestamp = clockService.getTimestamp(key, value);
+        Timestamp timestamp = timestampProvider.apply(key, value);
 
         if (putInternal(key, value, timestamp)) {
             notifyPeers(new PutEntry<>(key, value, timestamp),
@@ -354,7 +352,7 @@
         checkNotNull(key, ERROR_NULL_KEY);
 
         // TODO prevent calls here if value is important for timestamp
-        Timestamp timestamp = clockService.getTimestamp(key, null);
+        Timestamp timestamp = timestampProvider.apply(key, null);
 
         if (removeInternal(key, timestamp)) {
             notifyPeers(new RemoveEntry<>(key, timestamp),
@@ -412,7 +410,7 @@
         checkNotNull(key, ERROR_NULL_KEY);
         checkNotNull(value, ERROR_NULL_VALUE);
 
-        Timestamp timestamp = clockService.getTimestamp(key, value);
+        Timestamp timestamp = timestampProvider.apply(key, value);
 
         if (removeInternal(key, timestamp)) {
             notifyPeers(new RemoveEntry<>(key, timestamp),
diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
index e91031a..a0cb189 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
@@ -59,7 +59,6 @@
 import org.onosproject.net.group.StoredGroupBucketEntry;
 import org.onosproject.net.group.StoredGroupEntry;
 import org.onosproject.store.AbstractStore;
-import org.onosproject.store.Timestamp;
 import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
 import org.onosproject.store.cluster.messaging.ClusterMessage;
 import org.onosproject.store.cluster.messaging.ClusterMessageHandler;
@@ -67,7 +66,6 @@
 import org.onosproject.store.serializers.DeviceIdSerializer;
 import org.onosproject.store.serializers.KryoNamespaces;
 import org.onosproject.store.serializers.URISerializer;
-import org.onosproject.store.service.ClockService;
 import org.onosproject.store.service.EventuallyConsistentMap;
 import org.onosproject.store.service.EventuallyConsistentMapBuilder;
 import org.onosproject.store.service.EventuallyConsistentMapEvent;
@@ -142,6 +140,8 @@
 
     private KryoNamespace.Builder kryoBuilder = null;
 
+    private final AtomicLong sequenceNumber = new AtomicLong(0);
+
     @Activate
     public void activate() {
         kryoBuilder = new KryoNamespace.Builder()
@@ -210,7 +210,8 @@
         groupStoreEntriesByKey = keyMapBuilder
                 .withName("groupstorekeymap")
                 .withSerializer(kryoBuilder)
-                .withClockService(new GroupStoreLogicalClockManager<>())
+                .withTimestampProvider((k, v) -> new MultiValuedTimestamp<>(System.currentTimeMillis(),
+                                                                            sequenceNumber.getAndIncrement()))
                 .build();
         groupStoreEntriesByKey.addListener(new GroupStoreKeyMapListener());
         log.debug("Current size of groupstorekeymap:{}",
@@ -223,7 +224,8 @@
         auditPendingReqQueue = auditMapBuilder
                 .withName("pendinggroupkeymap")
                 .withSerializer(kryoBuilder)
-                .withClockService(new GroupStoreLogicalClockManager<>())
+                .withTimestampProvider((k, v) -> new MultiValuedTimestamp<>(System.currentTimeMillis(),
+                                                                            sequenceNumber.getAndIncrement()))
                 .build();
         log.debug("Current size of pendinggroupkeymap:{}",
                   auditPendingReqQueue.size());
@@ -909,21 +911,6 @@
     }
 
     /**
-     * ClockService that generates wallclock based timestamps.
-     */
-    private class GroupStoreLogicalClockManager<T, U>
-        implements ClockService<T, U> {
-
-        private final AtomicLong sequenceNumber = new AtomicLong(0);
-
-        @Override
-        public Timestamp getTimestamp(T t1, U u1) {
-            return new MultiValuedTimestamp<>(System.currentTimeMillis(),
-                    sequenceNumber.getAndIncrement());
-        }
-    }
-
-    /**
      * Map handler to receive any events when the group key map is updated.
      */
     private class GroupStoreKeyMapListener implements
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
index 683d058..a884e7a 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
@@ -16,6 +16,7 @@
 package org.onosproject.store.intent.impl;
 
 import com.google.common.collect.ImmutableList;
+
 import org.apache.commons.lang.math.RandomUtils;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -48,6 +49,7 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Objects;
+import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.Collectors;
 
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -83,6 +85,8 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected PartitionService partitionService;
 
+    private final AtomicLong sequenceNumber = new AtomicLong(0);
+
     @Activate
     public void activate() {
         KryoNamespace.Builder intentSerializer = KryoNamespace.newBuilder()
@@ -94,14 +98,17 @@
         currentMap = storageService.<Key, IntentData>eventuallyConsistentMapBuilder()
                 .withName("intent-current")
                 .withSerializer(intentSerializer)
-                .withClockService(new IntentDataLogicalClockManager<>())
+                .withTimestampProvider((key, intentData) ->
+                                            new MultiValuedTimestamp<>(intentData.version(),
+                                                                       sequenceNumber.getAndIncrement()))
                 .withPeerUpdateFunction((key, intentData) -> getPeerNodes(key, intentData))
                 .build();
 
         pendingMap = storageService.<Key, IntentData>eventuallyConsistentMapBuilder()
                 .withName("intent-pending")
                 .withSerializer(intentSerializer)
-                .withClockService(new IntentDataClockManager<>())
+                .withTimestampProvider((key, intentData) -> new MultiValuedTimestamp<>(intentData.version(),
+                                                                                       System.nanoTime()))
                 .withPeerUpdateFunction((key, intentData) -> getPeerNodes(key, intentData))
                 .build();
 
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentDataClockManager.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentDataClockManager.java
deleted file mode 100644
index d828988..0000000
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentDataClockManager.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * 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.store.intent.impl;
-
-import org.onosproject.net.intent.IntentData;
-import org.onosproject.store.Timestamp;
-import org.onosproject.store.service.ClockService;
-import org.onosproject.store.service.MultiValuedTimestamp;
-
-/**
- * ClockService that uses IntentData versions as timestamps.
- */
-public class IntentDataClockManager<K> implements ClockService<K, IntentData> {
-    @Override
-    public Timestamp getTimestamp(K key, IntentData intentData) {
-        return new MultiValuedTimestamp<>(intentData.version(), System.nanoTime());
-    }
-}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentDataLogicalClockManager.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentDataLogicalClockManager.java
deleted file mode 100644
index 8d78138..0000000
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentDataLogicalClockManager.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * 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.store.intent.impl;
-
-import org.onosproject.net.intent.IntentData;
-import org.onosproject.store.Timestamp;
-import org.onosproject.store.service.ClockService;
-import org.onosproject.store.service.MultiValuedTimestamp;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * ClockService that generates logical timestamps based on IntentData versions.
- */
-public class IntentDataLogicalClockManager<K> implements ClockService<K, IntentData> {
-
-    private final AtomicLong sequenceNumber = new AtomicLong(0);
-
-    @Override
-    public Timestamp getTimestamp(K key, IntentData intentData) {
-        return new MultiValuedTimestamp<>(intentData.version(),
-                                          sequenceNumber.getAndIncrement());
-    }
-}
diff --git a/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java b/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java
index 77db68c..869976c 100644
--- a/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java
@@ -35,7 +35,6 @@
 import org.onosproject.store.cluster.messaging.ClusterMessage;
 import org.onosproject.store.cluster.messaging.ClusterMessageHandler;
 import org.onosproject.store.cluster.messaging.MessageSubject;
-import org.onosproject.store.service.ClockService;
 import org.onosproject.store.impl.LogicalTimestamp;
 import org.onosproject.store.service.WallClockTimestamp;
 import org.onosproject.store.serializers.KryoNamespaces;
@@ -148,7 +147,7 @@
                         clusterService, clusterCommunicator)
                 .withName(MAP_NAME)
                 .withSerializer(serializer)
-                .withClockService(clockService)
+                .withTimestampProvider((k, v) -> clockService.getTimestamp(k, v))
                 .withCommunicationExecutor(MoreExecutors.newDirectExecutorService())
                 .build();
 
@@ -805,12 +804,11 @@
      * @param <T> Type that the clock service will give out timestamps for
      * @param <U> Second type that the clock service will give out values for
      */
-    private class SequentialClockService<T, U> implements ClockService<T, U> {
+    private class SequentialClockService<T, U> {
 
         private static final long INITIAL_VALUE = 1;
         private final AtomicLong counter = new AtomicLong(INITIAL_VALUE);
 
-        @Override
         public Timestamp getTimestamp(T object, U object2) {
             return new TestTimestamp(counter.getAndIncrement());
         }
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java
index 7d99586..2925830 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/tunnel/impl/DistributedTunnelStore.java
@@ -57,7 +57,7 @@
 import org.onosproject.store.service.EventuallyConsistentMap;
 import org.onosproject.store.service.MultiValuedTimestamp;
 import org.onosproject.store.service.StorageService;
-import org.onosproject.store.service.WallclockClockManager;
+import org.onosproject.store.service.WallClockTimestamp;
 import org.slf4j.Logger;
 
 import com.google.common.base.MoreObjects;
@@ -114,23 +114,23 @@
         tunnelIdAsKeyStore = storageService
                 .<TunnelId, Tunnel>eventuallyConsistentMapBuilder()
                 .withName("all_tunnel").withSerializer(serializer)
-                .withClockService(new WallclockClockManager<>()).build();
+                .withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
         tunnelNameAsKeyStore = storageService
                 .<TunnelName, Set<TunnelId>>eventuallyConsistentMapBuilder()
                 .withName("tunnel_name_tunnel").withSerializer(serializer)
-                .withClockService(new WallclockClockManager<>()).build();
+                .withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
         srcAndDstKeyStore = storageService
                 .<TunnelKey, Set<TunnelId>>eventuallyConsistentMapBuilder()
                 .withName("src_dst_tunnel").withSerializer(serializer)
-                .withClockService(new WallclockClockManager<>()).build();
+                .withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
         typeKeyStore = storageService
                 .<Tunnel.Type, Set<TunnelId>>eventuallyConsistentMapBuilder()
                 .withName("type_tunnel").withSerializer(serializer)
-                .withClockService(new WallclockClockManager<>()).build();
+                .withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
         orderRelationship = storageService
                 .<ApplicationId, Set<TunnelSubscription>>eventuallyConsistentMapBuilder()
                 .withName("type_tunnel").withSerializer(serializer)
-                .withClockService(new WallclockClockManager<>()).build();
+                .withTimestampProvider((k, v) -> new WallClockTimestamp()).build();
         idGenerator = coreService.getIdGenerator(runnelOpTopoic);
         log.info("Started");
     }
