diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalConnectivityIntentCompiler.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
index 3ad3c0e..3612273 100644
--- a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
+++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
@@ -24,6 +24,8 @@
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
 import org.onosproject.net.AnnotationKeys;
 import org.onosproject.net.Annotations;
 import org.onosproject.net.ChannelSpacing;
@@ -51,8 +53,7 @@
 import org.onosproject.net.resource.ResourceAllocation;
 import org.onosproject.net.resource.ResourceService;
 import org.onosproject.net.resource.Resources;
-import org.onosproject.net.topology.AdapterLinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyEdge;
 import org.onosproject.net.topology.TopologyService;
@@ -337,34 +338,44 @@
         // Route in WDM topology
         Topology topology = topologyService.currentTopology();
         //TODO: refactor with LinkWeigher class Implementation
-        LinkWeight weight = new LinkWeight() {
+        LinkWeigher weight = new LinkWeigher() {
 
             @Override
-            public double weight(TopologyEdge edge) {
+            public Weight getInitialWeight() {
+                return ScalarWeight.toWeight(0.0);
+            }
+
+            @Override
+            public Weight getNonViableWeight() {
+                return ScalarWeight.NON_VIABLE_WEIGHT;
+            }
+
+            @Override
+            public Weight weight(TopologyEdge edge) {
                 // Disregard inactive or non-optical links
                 if (edge.link().state() == Link.State.INACTIVE) {
-                    return -1;
+                    return ScalarWeight.toWeight(-1);
                 }
                 if (edge.link().type() != Link.Type.OPTICAL) {
-                    return -1;
+                    return ScalarWeight.toWeight(-1);
                 }
                 // Adhere to static port mappings
                 DeviceId srcDeviceId = edge.link().src().deviceId();
                 if (srcDeviceId.equals(intent.getSrc().deviceId())) {
                     ConnectPoint srcStaticPort = staticPort(intent.getSrc());
                     if (srcStaticPort != null) {
-                        return srcStaticPort.equals(edge.link().src()) ? 1 : -1;
+                        return ScalarWeight.toWeight(srcStaticPort.equals(edge.link().src()) ? 1 : -1);
                     }
                 }
                 DeviceId dstDeviceId = edge.link().dst().deviceId();
                 if (dstDeviceId.equals(intent.getDst().deviceId())) {
                     ConnectPoint dstStaticPort = staticPort(intent.getDst());
                     if (dstStaticPort != null) {
-                        return dstStaticPort.equals(edge.link().dst()) ? 1 : -1;
+                        return ScalarWeight.toWeight(dstStaticPort.equals(edge.link().dst()) ? 1 : -1);
                     }
                 }
 
-                return 1;
+                return ScalarWeight.toWeight(1);
             }
         };
 
@@ -393,7 +404,7 @@
         Stream<Path> paths = topologyService.getKShortestPaths(topology,
                 start.deviceId(),
                 end.deviceId(),
-                AdapterLinkWeigher.adapt(weight))
+                weight)
                 .filter(p -> p.links().get(0).src().port().equals(start.port()) &&
                         p.links().get(p.links().size() - 1).dst().port().equals(end.port()));
         if (log.isDebugEnabled()) {
diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompiler.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompiler.java
index 4b386bd..e45bfb1 100644
--- a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompiler.java
+++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompiler.java
@@ -21,6 +21,8 @@
 import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
 import org.onosproject.net.ConnectPoint;
@@ -54,8 +56,9 @@
 import org.onosproject.net.resource.ResourceService;
 import org.onosproject.net.resource.ResourceAllocation;
 import org.onosproject.net.resource.Resources;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.Topology;
+import org.onosproject.net.topology.TopologyEdge;
 import org.onosproject.net.topology.TopologyService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -256,25 +259,41 @@
         // Route in OTU topology
         Topology topology = topologyService.currentTopology();
 
-        LinkWeight weight = edge -> {
-            // Disregard inactive or non-optical links
-            if (edge.link().state() == Link.State.INACTIVE) {
-                return -1;
+
+        class Weigher implements LinkWeigher {
+            @Override
+            public Weight weight(TopologyEdge edge) {
+                if (edge.link().state() == Link.State.INACTIVE) {
+                    return ScalarWeight.toWeight(-1);
+                }
+                if (edge.link().type() != Link.Type.OPTICAL) {
+                    return ScalarWeight.toWeight(-1);
+                }
+                // Find path with available TributarySlots resources
+                if (!isAvailableTributarySlots(intent, edge.link())) {
+                    return ScalarWeight.toWeight(-1);
+                }
+                return ScalarWeight.toWeight(1);
             }
-            if (edge.link().type() != Link.Type.OPTICAL) {
-                return -1;
+
+            @Override
+            public Weight getInitialWeight() {
+                return null;
             }
-            // Find path with available TributarySlots resources
-            if (!isAvailableTributarySlots(intent, edge.link())) {
-                return -1;
+
+            @Override
+            public Weight getNonViableWeight() {
+                return null;
             }
-            return 1;
-        };
+        }
+
+
+        LinkWeigher weigher = new Weigher();
 
         ConnectPoint start = intent.getSrc();
         ConnectPoint end = intent.getDst();
 
-        return topologyService.getPaths(topology, start.deviceId(), end.deviceId(), weight);
+        return topologyService.getPaths(topology, start.deviceId(), end.deviceId(), weigher);
     }
 
     private boolean isAvailableTributarySlots(OpticalOduIntent intent, Link link) {
diff --git a/apps/optical-model/src/test/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompilerTest.java b/apps/optical-model/src/test/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompilerTest.java
index 46c408f..2c39274 100644
--- a/apps/optical-model/src/test/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompilerTest.java
+++ b/apps/optical-model/src/test/java/org/onosproject/net/optical/intent/impl/compiler/OpticalOduIntentCompilerTest.java
@@ -66,7 +66,7 @@
 import org.onosproject.net.optical.impl.DefaultOtuPort;
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.net.resource.MockResourceService;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyServiceAdapter;
 
@@ -173,13 +173,13 @@
         Set<Path> paths = Sets.newHashSet(path);
 
         @Override
-        public Topology currentTopology() {
-            return null;
+        public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weight) {
+            return paths;
         }
 
         @Override
-        public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeight weight) {
-            return paths;
+        public Topology currentTopology() {
+            return null;
         }
     }
 
diff --git a/apps/pathpainter/src/main/java/org/onosproject/pathpainter/PathPainterTopovMessageHandler.java b/apps/pathpainter/src/main/java/org/onosproject/pathpainter/PathPainterTopovMessageHandler.java
index 7da14a9..b1f9d44 100644
--- a/apps/pathpainter/src/main/java/org/onosproject/pathpainter/PathPainterTopovMessageHandler.java
+++ b/apps/pathpainter/src/main/java/org/onosproject/pathpainter/PathPainterTopovMessageHandler.java
@@ -28,7 +28,7 @@
 import org.onosproject.net.Path;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.topology.GeoDistanceLinkWeight;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.PathService;
 import org.onosproject.net.topology.TopologyEvent;
 import org.onosproject.net.topology.TopologyListener;
@@ -78,7 +78,7 @@
 
     private Set<Link> allPathLinks;
     private boolean listenersRemoved;
-    private LinkWeight linkData;
+    private LinkWeigher linkData;
     private int highlightDelay;
 
     private enum Mode {
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java b/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java
index 3ecdd5b..e7ef935 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java
@@ -18,6 +18,7 @@
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
 import org.onosproject.net.DisjointPath;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -68,6 +69,7 @@
 import org.onosproject.net.link.LinkEvent;
 import org.onosproject.net.MastershipRole;
 import org.onosproject.bandwidthmgr.api.BandwidthMgmtService;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.pce.pceservice.constraint.CapabilityConstraint;
 import org.onosproject.pce.pceservice.constraint.CapabilityConstraint.CapabilityType;
 import org.onosproject.pce.pceservice.constraint.CostConstraint;
@@ -75,7 +77,6 @@
 import org.onosproject.pce.pceservice.constraint.SharedBandwidthConstraint;
 import org.onosproject.net.resource.Resource;
 import org.onosproject.net.resource.ResourceAllocation;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.PathService;
 import org.onosproject.net.topology.TopologyEdge;
 import org.onosproject.net.topology.TopologyEvent;
@@ -225,7 +226,7 @@
      * @param constraints path constraints
      * @return edge-weight function
      */
-    private LinkWeight weight(List<Constraint> constraints) {
+    private LinkWeigher weight(List<Constraint> constraints) {
         return new TeConstraintBasedLinkWeight(constraints);
     }
 
@@ -957,7 +958,7 @@
         return value;
     }
 
-    protected class TeConstraintBasedLinkWeight implements LinkWeight {
+    protected class TeConstraintBasedLinkWeight implements LinkWeigher {
 
         private final List<Constraint> constraints;
 
@@ -976,10 +977,20 @@
         }
 
         @Override
-        public double weight(TopologyEdge edge) {
+        public Weight getInitialWeight() {
+            return ScalarWeight.toWeight(0.0);
+        }
+
+        @Override
+        public Weight getNonViableWeight() {
+            return ScalarWeight.toWeight(0.0);
+        }
+
+        @Override
+        public Weight weight(TopologyEdge edge) {
             if (!constraints.iterator().hasNext()) {
                 //Takes default cost/hopcount as 1 if no constraints specified
-                return 1.0;
+                return ScalarWeight.toWeight(1.0);
             }
 
             Iterator<Constraint> it = constraints.iterator();
@@ -1003,7 +1014,7 @@
                     cost = constraint.cost(edge.link(), null);
                 }
             }
-            return cost;
+            return ScalarWeight.toWeight(cost);
         }
     }
 
diff --git a/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PathComputationTest.java b/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PathComputationTest.java
index bdd593c..fd13454 100644
--- a/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PathComputationTest.java
+++ b/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PathComputationTest.java
@@ -29,6 +29,8 @@
 import org.onlab.graph.DijkstraGraphSearch;
 import org.onlab.graph.Graph;
 import org.onlab.graph.GraphPathSearch;
+import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
 import org.onlab.packet.ChassisId;
 import org.onlab.util.Bandwidth;
 import org.onosproject.net.AnnotationKeys;
@@ -53,7 +55,7 @@
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.net.topology.DefaultTopologyEdge;
 import org.onosproject.net.topology.DefaultTopologyVertex;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.TopologyEdge;
 import org.onosproject.net.topology.TopologyVertex;
 import org.onosproject.pce.pceservice.constraint.CapabilityConstraint;
@@ -82,7 +84,6 @@
 import static org.onosproject.net.DeviceId.deviceId;
 import static org.onosproject.net.Link.State.ACTIVE;
 import static org.onosproject.net.Link.Type.DIRECT;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 import static org.onosproject.pce.pceservice.constraint.CostConstraint.Type.COST;
 import static org.onosproject.pce.pceservice.constraint.CostConstraint.Type.TE_COST;
 
@@ -168,7 +169,7 @@
      * @param constraints path constraints
      * @return edge-weight function
      */
-    private LinkWeight weight(List<Constraint> constraints) {
+    private LinkWeigher weight(List<Constraint> constraints) {
         return new MockTeConstraintBasedLinkWeight(constraints);
     }
 
@@ -180,7 +181,7 @@
                    new DefaultTopologyEdge(D3, D4, link4)));
 
         GraphPathSearch.Result<TopologyVertex, TopologyEdge> result =
-                graphSearch().search(graph, D1, D4, adapt(weight(constraints)), ALL_PATHS);
+                graphSearch().search(graph, D1, D4, weight(constraints), ALL_PATHS);
         ImmutableSet.Builder<Path> builder = ImmutableSet.builder();
         for (org.onlab.graph.Path<TopologyVertex, TopologyEdge> path : result.paths()) {
             builder.add(networkPath(path));
@@ -211,7 +212,7 @@
         }
     }
 
-    private class MockTeConstraintBasedLinkWeight implements LinkWeight {
+    private class MockTeConstraintBasedLinkWeight implements LinkWeigher {
 
         private final List<Constraint> constraints;
 
@@ -230,10 +231,20 @@
         }
 
         @Override
-        public double weight(TopologyEdge edge) {
+        public Weight getInitialWeight() {
+            return ScalarWeight.toWeight(0.0);
+        }
+
+        @Override
+        public Weight getNonViableWeight() {
+            return ScalarWeight.NON_VIABLE_WEIGHT;
+        }
+
+        @Override
+        public Weight weight(TopologyEdge edge) {
             if (!constraints.iterator().hasNext()) {
                 //Takes default cost/hopcount as 1 if no constraints specified
-                return 1.0;
+                return ScalarWeight.toWeight(1.0);
             }
 
             Iterator<Constraint> it = constraints.iterator();
@@ -259,7 +270,7 @@
                     cost = constraint.cost(edge.link(), null);
                 }
             }
-            return cost;
+            return ScalarWeight.toWeight(cost);
         }
     }
 
@@ -1274,7 +1285,7 @@
                    new DefaultTopologyEdge(D4, D5, link5)));
 
         GraphPathSearch.Result<TopologyVertex, TopologyEdge> result =
-                graphSearch().search(graph, D1, D5, adapt(weight(constraints)), ALL_PATHS);
+                graphSearch().search(graph, D1, D5, weight(constraints), ALL_PATHS);
         ImmutableSet.Builder<Path> builder = ImmutableSet.builder();
         for (org.onlab.graph.Path<TopologyVertex, TopologyEdge> path : result.paths()) {
             builder.add(networkPath(path));
diff --git a/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java b/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java
index 432ffb6..9cf7069 100644
--- a/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java
+++ b/apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java
@@ -56,7 +56,7 @@
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.net.topology.DefaultTopologyEdge;
 import org.onosproject.net.topology.DefaultTopologyVertex;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.PathServiceAdapter;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyEdge;
@@ -92,7 +92,6 @@
 import static org.onosproject.incubator.net.tunnel.Tunnel.State.ESTABLISHED;
 import static org.onosproject.incubator.net.tunnel.Tunnel.State.UNSTABLE;
 import static org.onosproject.net.MastershipRole.MASTER;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 import static org.onosproject.pce.pceservice.LspType.SR_WITHOUT_SIGNALLING;
 import static org.onosproject.pce.pceservice.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR;
 import static org.onosproject.pce.pceservice.LspType.WITH_SIGNALLING;
@@ -1476,7 +1475,7 @@
         }
 
         @Override
-        public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeight weight) {
+        public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weight) {
             DefaultTopologyVertex srcV = new DefaultTopologyVertex(src);
             DefaultTopologyVertex dstV = new DefaultTopologyVertex(dst);
             Set<TopologyVertex> vertices = graph.getVertexes();
@@ -1486,7 +1485,7 @@
             }
 
             GraphPathSearch.Result<TopologyVertex, TopologyEdge> result = PathComputationTest.graphSearch()
-                    .search(graph, srcV, dstV, adapt(weight), ALL_PATHS);
+                    .search(graph, srcV, dstV, weight, ALL_PATHS);
             ImmutableSet.Builder<Path> builder = ImmutableSet.builder();
             for (org.onlab.graph.Path<TopologyVertex, TopologyEdge> path : result.paths()) {
                 builder.add(PathComputationTest.networkPath(path));
@@ -1521,7 +1520,7 @@
     private class MockPathService extends PathServiceAdapter {
         Set<Path> computedPaths;
         @Override
-        public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight) {
+        public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weight) {
             // If either edge is null, bail with no paths.
             if (src == null || dst == null) {
                 return ImmutableSet.of();
diff --git a/core/api/src/main/java/org/onosproject/net/topology/AbstractPathService.java b/core/api/src/main/java/org/onosproject/net/topology/AbstractPathService.java
index 7c831e7..cf9a531 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/AbstractPathService.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/AbstractPathService.java
@@ -42,7 +42,6 @@
 import java.util.stream.Stream;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 
 /**
  * Helper class for path service.
@@ -60,18 +59,13 @@
     private static final PortNumber P0 = PortNumber.portNumber(0);
 
     protected static final LinkWeigher DEFAULT_WEIGHER =
-            adapt(new HopCountLinkWeight());
+            new HopCountLinkWeigher();
 
     protected TopologyService topologyService;
 
     protected HostService hostService;
 
     @Override
-    public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight) {
-        return getPaths(src, dst, adapt(weight));
-    }
-
-    @Override
     public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weigher) {
         checkNotNull(src, ELEMENT_ID_NULL);
         checkNotNull(dst, ELEMENT_ID_NULL);
@@ -140,11 +134,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight) {
-        return getDisjointPaths(src, dst, adapt(weight));
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher) {
         checkNotNull(src, ELEMENT_ID_NULL);
         checkNotNull(dst, ELEMENT_ID_NULL);
@@ -179,12 +168,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight,
-                                              Map<Link, Object> riskProfile) {
-        return getDisjointPaths(src, dst, adapt(weight), riskProfile);
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
                                               LinkWeigher weigher, Map<Link, Object> riskProfile) {
         checkNotNull(src, ELEMENT_ID_NULL);
diff --git a/core/api/src/main/java/org/onosproject/net/topology/AdapterLinkWeigher.java b/core/api/src/main/java/org/onosproject/net/topology/AdapterLinkWeigher.java
deleted file mode 100644
index 70260e3..0000000
--- a/core/api/src/main/java/org/onosproject/net/topology/AdapterLinkWeigher.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2016-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.topology;
-
-import org.onlab.graph.DefaultEdgeWeigher;
-import org.onlab.graph.ScalarWeight;
-import org.onlab.graph.Weight;
-
-/**
- * Wrapper which transforms double-based link weigher to {@link Weight}-based
- * link weigher.
- */
-public final class AdapterLinkWeigher
-        extends DefaultEdgeWeigher<TopologyVertex, TopologyEdge>
-        implements LinkWeigher {
-
-    private final LinkWeight doubleWeigher;
-
-    private AdapterLinkWeigher(LinkWeight doubleWeigher) {
-        this.doubleWeigher = doubleWeigher;
-    }
-
-    @Override
-    public Weight weight(TopologyEdge edge) {
-        return new ScalarWeight(doubleWeigher.weight(edge));
-    }
-
-    /**
-     * Transforms double-based link weigher to {@link Weight}-based weigher.
-     *
-     * @param lw double-based weigher
-     * @return {@link Weight}-based weigher
-     */
-    public static LinkWeigher adapt(LinkWeight lw) {
-        return lw == null ? null : new AdapterLinkWeigher(lw);
-    }
-}
diff --git a/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java b/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java
index f30fc80..9d22b84 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java
@@ -16,6 +16,8 @@
 
 package org.onosproject.net.topology;
 
+import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
 import org.onlab.util.GeoLocation;
 import org.onosproject.net.AnnotationKeys;
 import org.onosproject.net.Annotations;
@@ -29,7 +31,7 @@
  * Link weight for measuring link cost using the geo distance between link
  * vertices as determined by the element longitude/latitude annotation.
  */
-public class GeoDistanceLinkWeight implements LinkWeight {
+public class GeoDistanceLinkWeight implements LinkWeigher {
 
     private static final double MAX_KM = 40_075 / 2.0;
 
@@ -45,10 +47,20 @@
     }
 
     @Override
-    public double weight(TopologyEdge edge) {
+    public Weight getInitialWeight() {
+        return ScalarWeight.toWeight(0.0);
+    }
+
+    @Override
+    public Weight getNonViableWeight() {
+        return ScalarWeight.NON_VIABLE_WEIGHT;
+    }
+
+    @Override
+    public Weight weight(TopologyEdge edge) {
         GeoLocation src = getLocation(edge.link().src().deviceId());
         GeoLocation dst = getLocation(edge.link().dst().deviceId());
-        return src != null && dst != null ? src.kilometersTo(dst) : MAX_KM;
+        return ScalarWeight.toWeight(src != null && dst != null ? src.kilometersTo(dst) : MAX_KM);
     }
 
     private GeoLocation getLocation(DeviceId deviceId) {
diff --git a/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java b/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java
deleted file mode 100644
index 885cd67..0000000
--- a/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2015-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.topology;
-
-import static org.onosproject.net.Link.State.ACTIVE;
-import static org.onosproject.net.Link.Type.INDIRECT;
-
-/**
- * Link weight for measuring link cost as hop count with indirect links
- * being as expensive as traversing the entire graph to assume the worst.
- */
-public class HopCountLinkWeight implements LinkWeight {
-    private final int indirectLinkCost;
-
-    /**
-     * Creates a new hop-count weight.
-     */
-    public HopCountLinkWeight() {
-        this.indirectLinkCost = Short.MAX_VALUE;
-    }
-
-    /**
-     * Creates a new hop-count weight with the specified cost of indirect links.
-     *
-     * @param indirectLinkCost indirect link cost
-     */
-    public HopCountLinkWeight(int indirectLinkCost) {
-        this.indirectLinkCost = indirectLinkCost;
-    }
-
-    @Override
-    public double weight(TopologyEdge edge) {
-        // To force preference to use direct paths first, make indirect
-        // links as expensive as the linear vertex traversal.
-        return edge.link().state() ==
-                ACTIVE ? (edge.link().type() ==
-                INDIRECT ? indirectLinkCost : 1) : -1;
-    }
-}
-
diff --git a/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java b/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java
deleted file mode 100644
index 944c843..0000000
--- a/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2014-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.topology;
-
-/**
- * Entity capable of determining cost or weight of a specified topology
- * graph edge.
- * @deprecated in Junco (1.9.0), use {@link LinkWeigher} instead
- */
-@Deprecated
-public interface LinkWeight {
-
-    /**
-     * Returns the weight of the given edge.
-     *
-     * @param edge edge to be weighed
-     * @return edge weight
-     */
-    double weight(TopologyEdge edge);
-}
diff --git a/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java b/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java
index e24ea4a..e87f660 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java
@@ -16,20 +16,32 @@
 
 package org.onosproject.net.topology;
 
+import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
 import org.onosproject.net.AnnotationKeys;
 
 /**
  * Link weight for measuring link cost using the link metric annotation.
  */
-public class MetricLinkWeight implements LinkWeight {
+public class MetricLinkWeight implements LinkWeigher {
 
     @Override
-    public double weight(TopologyEdge edge) {
+    public Weight getInitialWeight() {
+        return ScalarWeight.toWeight(0.0);
+    }
+
+    @Override
+    public Weight getNonViableWeight() {
+        return ScalarWeight.NON_VIABLE_WEIGHT;
+    }
+
+    @Override
+    public Weight weight(TopologyEdge edge) {
         String v = edge.link().annotations().value(AnnotationKeys.METRIC);
         try {
-            return v != null ? Double.parseDouble(v) : 1;
+            return ScalarWeight.toWeight(v != null ? Double.parseDouble(v) : 1);
         } catch (NumberFormatException e) {
-            return 1;
+            return ScalarWeight.toWeight(1.0);
         }
     }
 }
diff --git a/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java b/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java
index fed0651..fb67c91 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java
@@ -28,18 +28,6 @@
      * If null is specified, the builtin default hop-count link-weight will be
      * used.
      *
-     * @param linkWeight default link-weight function
-     *
-     * @deprecated in Junco (1.9.0), use setDefaultLinkWeigher() instead
-     */
-    @Deprecated
-    void setDefaultLinkWeight(LinkWeight linkWeight);
-
-    /**
-     * Sets the specified link-weight function to be used as a default.
-     * If null is specified, the builtin default hop-count link-weight will be
-     * used.
-     *
      * @param linkWeigher link-weight function to be used as default
      */
     void setDefaultLinkWeigher(LinkWeigher linkWeigher);
diff --git a/core/api/src/main/java/org/onosproject/net/topology/PathService.java b/core/api/src/main/java/org/onosproject/net/topology/PathService.java
index ae2de8b..73f0149 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/PathService.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/PathService.java
@@ -48,21 +48,6 @@
      * destination network elements.  The path is computed using the supplied
      * edge-weight function.
      *
-     * @param src    source element
-     * @param dst    destination element
-     * @param weight edge-weight entity
-     * @return set of all shortest paths between the two element
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
-
-    /**
-     * Returns the set of all shortest paths between the specified source and
-     * destination network elements.  The path is computed using the supplied
-     * edge-weight function.
-     *
      * @param src     source element
      * @param dst     destination element
      * @param weigher edge-weight entity
@@ -113,22 +98,6 @@
      * specified source and destination elements. The path is computed using
      * the supplied edge-weight function.
      *
-     * @param src    source device
-     * @param dst    destination device
-     * @param weight edge-weight entity
-     * @return set of all shortest paths between the two devices
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
-                                       LinkWeight weight);
-
-    /**
-     * Returns the set of all disjoint shortest path pairs between the
-     * specified source and destination elements. The path is computed using
-     * the supplied edge-weight function.
-     *
      * @param src     source device
      * @param dst     destination device
      * @param weigher edge-weight entity
@@ -159,25 +128,6 @@
      *
      * @param src         source device
      * @param dst         destination device
-     * @param weight      edge-weight entity
-     * @param riskProfile map of edges to risk profiles
-     * @return set of all shortest paths between the two devices
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
-                                       LinkWeight weight,
-                                       Map<Link, Object> riskProfile);
-
-    /**
-     * Returns the set of all disjoint shortest path pairs between the
-     * specified source and destination elements and taking into consideration
-     * the provided risk profile. The path is computed using the supplied
-     * edge-weight function.
-     *
-     * @param src         source device
-     * @param dst         destination device
      * @param weigher     edge-weight entity
      * @param riskProfile map of edges to risk profiles
      * @return set of all shortest paths between the two devices
diff --git a/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java b/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java
index 6d95a97..ee70ed7 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java
@@ -111,22 +111,6 @@
      * @param topology topology descriptor
      * @param src      source device
      * @param dst      destination device
-     * @param weight   edge-weight entity
-     * @return set of all shortest paths between the two devices
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
-                       LinkWeight weight);
-
-    /**
-     * Returns the set of all shortest paths, computed using the supplied
-     * edge-weight entity, between the specified source and destination devices.
-     *
-     * @param topology topology descriptor
-     * @param src      source device
-     * @param dst      destination device
      * @param weigher  edge-weight entity
      * @return set of all shortest paths between the two devices
      */
@@ -204,22 +188,6 @@
      * @param topology topology descriptor
      * @param src      source device
      * @param dst      destination device
-     * @param weight   edge-weight entity
-     * @return set of all shortest paths between the two devices
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                       LinkWeight weight);
-
-    /**
-     * Returns the set of all disjoint shortest path pairs, computed using the supplied
-     * edge-weight entity, between the specified source and destination devices.
-     *
-     * @param topology topology descriptor
-     * @param src      source device
-     * @param dst      destination device
      * @param weigher  edge-weight entity
      * @return set of all shortest paths between the two devices
      */
@@ -246,23 +214,6 @@
      * @param topology    topology descriptor
      * @param src         source device
      * @param dst         destination device
-     * @param weight      edge-weight entity
-     * @param riskProfile map of edges to risk profiles
-     * @return set of all shortest paths between the two devices
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                       LinkWeight weight, Map<Link, Object> riskProfile);
-
-    /**
-     * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
-     * between the specified source and destination devices.
-     *
-     * @param topology    topology descriptor
-     * @param src         source device
-     * @param dst         destination device
      * @param weigher     edge-weight entity
      * @param riskProfile map of edges to risk profiles
      * @return set of all shortest paths between the two devices
diff --git a/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java b/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java
index 99838c6..17957e1 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java
@@ -109,21 +109,6 @@
      * @param topology topology descriptor
      * @param src      source device
      * @param dst      destination device
-     * @param weight   link weight function
-     * @return set of shortest paths
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
-                       LinkWeight weight);
-
-    /**
-     * Computes and returns the set of shortest paths between src and dest.
-     *
-     * @param topology topology descriptor
-     * @param src      source device
-     * @param dst      destination device
      * @param weigher  link weight function
      * @return set of shortest paths
      */
@@ -176,22 +161,6 @@
      * @param topology topology descriptor
      * @param src      source device
      * @param dst      destination device
-     * @param weight   link weight function
-     * @return set of shortest paths
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                       LinkWeight weight);
-
-    /**
-     * Computes and returns the set of disjoint shortest path pairs
-     * between src and dst.
-     *
-     * @param topology topology descriptor
-     * @param src      source device
-     * @param dst      destination device
      * @param weigher  link weight function
      * @return set of shortest paths
      */
@@ -216,24 +185,6 @@
      * @param topology    topology descriptor
      * @param src         source device
      * @param dst         destination device
-     * @param weight      link weight function
-     * @param riskProfile map of edges to objects. Edges that map to the same object will
-     * be treated as if they were in the same risk group.
-     * @return set of shortest paths
-     *
-     * @deprecated in Junco (1.9.0), use version with LinkWeigher instead
-     */
-    @Deprecated
-    Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                       LinkWeight weight, Map<Link, Object> riskProfile);
-
-    /**
-     * Computes and returns the set of SRLG disjoint shortest path pairs between source
-     * and dst, given a mapping of edges to SRLG risk groups.
-     *
-     * @param topology    topology descriptor
-     * @param src         source device
-     * @param dst         destination device
      * @param weigher     link weight function
      * @param riskProfile map of edges to objects. Edges that map to the same object will
      * be treated as if they were in the same risk group.
diff --git a/core/api/src/test/java/org/onosproject/net/topology/LinkWeigherAdapter.java b/core/api/src/test/java/org/onosproject/net/topology/LinkWeigherAdapter.java
new file mode 100644
index 0000000..bf3f934
--- /dev/null
+++ b/core/api/src/test/java/org/onosproject/net/topology/LinkWeigherAdapter.java
@@ -0,0 +1,42 @@
+/*
+ * 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.topology;
+
+import org.onlab.graph.ScalarWeight;
+import org.onlab.graph.Weight;
+
+public class LinkWeigherAdapter implements LinkWeigher {
+    final double weight;
+
+    public LinkWeigherAdapter(Double weight) {
+        this.weight = weight;
+    }
+    @Override
+    public Weight weight(TopologyEdge edge) {
+        return ScalarWeight.toWeight(weight);
+    }
+
+    @Override
+    public Weight getInitialWeight() {
+        return ScalarWeight.toWeight(0.0);
+    }
+
+    @Override
+    public Weight getNonViableWeight() {
+        return ScalarWeight.toWeight(0.0);
+    }
+}
diff --git a/core/api/src/test/java/org/onosproject/net/topology/PathServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/topology/PathServiceAdapter.java
index 1e18030..86a9405 100644
--- a/core/api/src/test/java/org/onosproject/net/topology/PathServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/topology/PathServiceAdapter.java
@@ -33,11 +33,6 @@
     }
 
     @Override
-    public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight) {
-        return null;
-    }
-
-    @Override
     public Set<Path> getPaths(ElementId src, ElementId dst,
                               LinkWeigher weigher) {
         return null;
@@ -50,12 +45,6 @@
 
     @Override
     public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
-                                              LinkWeight weight) {
-        return null;
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
                                               LinkWeigher weigher) {
         return null;
     }
@@ -68,13 +57,6 @@
 
     @Override
     public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
-                                              LinkWeight weight,
-                                              Map<Link, Object> riskProfile) {
-        return null;
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
                                               LinkWeigher weigher,
                                               Map<Link, Object> riskProfile) {
         return null;
diff --git a/core/api/src/test/java/org/onosproject/net/topology/TopologyServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/topology/TopologyServiceAdapter.java
index a3266fb..b75dbb0 100644
--- a/core/api/src/test/java/org/onosproject/net/topology/TopologyServiceAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/topology/TopologyServiceAdapter.java
@@ -72,12 +72,6 @@
 
     @Override
     public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
-                              LinkWeight weight) {
-        return null;
-    }
-
-    @Override
-    public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
                               LinkWeigher weigher) {
         return null;
     }
@@ -111,13 +105,6 @@
     @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
-                                              LinkWeight weight) {
-        return null;
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
-                                              DeviceId dst,
                                               LinkWeigher weigher) {
         return null;
     }
@@ -131,13 +118,6 @@
 
     @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
-                                              DeviceId dst, LinkWeight weight,
-                                              Map<Link, Object> riskProfile) {
-        return null;
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
                                               LinkWeigher weigher,
                                               Map<Link, Object> riskProfile) {
diff --git a/core/common/src/main/java/org/onosproject/common/DefaultTopology.java b/core/common/src/main/java/org/onosproject/common/DefaultTopology.java
index 4b266a8..ecbb573 100644
--- a/core/common/src/main/java/org/onosproject/common/DefaultTopology.java
+++ b/core/common/src/main/java/org/onosproject/common/DefaultTopology.java
@@ -49,7 +49,7 @@
 import org.onosproject.net.topology.DefaultTopologyCluster;
 import org.onosproject.net.topology.DefaultTopologyVertex;
 import org.onosproject.net.topology.GraphDescription;
-import org.onosproject.net.topology.HopCountLinkWeight;
+import org.onosproject.net.topology.HopCountLinkWeigher;
 import org.onosproject.net.topology.LinkWeigher;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyCluster;
@@ -73,7 +73,6 @@
 import static org.onosproject.core.CoreService.CORE_PROVIDER_ID;
 import static org.onosproject.net.Link.State.INACTIVE;
 import static org.onosproject.net.Link.Type.INDIRECT;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 
 /**
  * Default implementation of the topology descriptor. This carries the backing
@@ -160,7 +159,7 @@
 
         this.clusterIndexes = Suppliers.memoize(this::buildIndexes);
 
-        this.hopCountWeigher = adapt(new HopCountLinkWeight(graph.getVertexes().size()));
+        this.hopCountWeigher = new HopCountLinkWeigher(graph.getVertexes().size());
         this.broadcastSets = Suppliers.memoize(this::buildBroadcastSets);
         this.infrastructurePoints = Suppliers.memoize(this::findInfrastructurePoints);
         this.computeCost = Math.max(0, System.nanoTime() - time);
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleTopologyStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleTopologyStore.java
index 8030869..cb34df1 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleTopologyStore.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleTopologyStore.java
@@ -30,7 +30,6 @@
 import org.onosproject.net.topology.ClusterId;
 import org.onosproject.net.topology.GraphDescription;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyCluster;
 import org.onosproject.net.topology.TopologyEvent;
@@ -44,7 +43,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 import static org.slf4j.LoggerFactory.getLogger;
 
 /**
@@ -112,12 +110,6 @@
     }
 
     @Override
-    public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
-                              LinkWeight weight) {
-        return getPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
     public Set<Path> getPaths(Topology topology, DeviceId src,
                               DeviceId dst, LinkWeigher weigher) {
         return defaultTopology(topology).getPaths(src, dst, weigher);
@@ -129,12 +121,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                              LinkWeight weight) {
-        return getDisjointPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst, LinkWeigher weigher) {
         return defaultTopology(topology).getDisjointPaths(src, dst, weigher);
@@ -147,12 +133,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                                  LinkWeight weight, Map<Link, Object> riskProfile) {
-        return getDisjointPaths(topology, src, dst, adapt(weight), riskProfile);
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
                                               LinkWeigher weigher,
diff --git a/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java b/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java
index ec73c3b..cc9cc53 100644
--- a/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java
+++ b/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java
@@ -27,7 +27,6 @@
 import org.onosproject.net.Path;
 import org.onosproject.net.host.HostService;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.PathService;
 import org.onosproject.net.topology.TopologyService;
 import org.onosproject.net.topology.AbstractPathService;
@@ -80,12 +79,6 @@
     }
 
     @Override
-    public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight) {
-        checkPermission(TOPOLOGY_READ);
-        return super.getPaths(src, dst, weight);
-    }
-
-    @Override
     public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weigher) {
         checkPermission(TOPOLOGY_READ);
         return super.getPaths(src, dst, weigher);
@@ -105,12 +98,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight) {
-        checkPermission(TOPOLOGY_READ);
-        return super.getDisjointPaths(src, dst, weight);
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher) {
         checkPermission(TOPOLOGY_READ);
         return super.getDisjointPaths(src, dst, weigher);
@@ -124,13 +111,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight,
-                                              Map<Link, Object> riskProfile) {
-        checkPermission(TOPOLOGY_READ);
-        return super.getDisjointPaths(src, dst, weight, riskProfile);
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher,
                                               Map<Link, Object> riskProfile) {
         checkPermission(TOPOLOGY_READ);
diff --git a/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java b/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java
index 522c23c..0d15645 100644
--- a/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java
+++ b/core/net/src/main/java/org/onosproject/net/topology/impl/TopologyManager.java
@@ -21,18 +21,17 @@
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.Service;
-import org.onosproject.net.DisjointPath;
-import org.onosproject.net.provider.AbstractListenerProviderRegistry;
 import org.onosproject.event.Event;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
+import org.onosproject.net.DisjointPath;
 import org.onosproject.net.Link;
 import org.onosproject.net.Path;
+import org.onosproject.net.provider.AbstractListenerProviderRegistry;
 import org.onosproject.net.provider.AbstractProviderService;
 import org.onosproject.net.topology.ClusterId;
 import org.onosproject.net.topology.GraphDescription;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyCluster;
 import org.onosproject.net.topology.TopologyEvent;
@@ -47,15 +46,14 @@
 import org.slf4j.Logger;
 
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.stream.Stream;
-import java.util.Map;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 import static org.onosproject.security.AppGuard.checkPermission;
+import static org.onosproject.security.AppPermission.Type.TOPOLOGY_READ;
 import static org.slf4j.LoggerFactory.getLogger;
-import static org.onosproject.security.AppPermission.Type.*;
 
 
 /**
@@ -158,12 +156,6 @@
 
     @Override
     public Set<Path> getPaths(Topology topology, DeviceId src,
-                              DeviceId dst, LinkWeight weight) {
-        return getPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
-    public Set<Path> getPaths(Topology topology, DeviceId src,
                               DeviceId dst, LinkWeigher weigher) {
         checkPermission(TOPOLOGY_READ);
 
@@ -214,13 +206,6 @@
     @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
-                                              LinkWeight weight) {
-        return getDisjointPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
-                                              DeviceId dst,
                                               LinkWeigher weigher) {
         checkPermission(TOPOLOGY_READ);
         checkNotNull(topology, TOPOLOGY_NULL);
@@ -243,13 +228,6 @@
 
     @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
-                                              DeviceId dst, LinkWeight weight,
-                                              Map<Link, Object> riskProfile) {
-        return getDisjointPaths(topology, src, dst, adapt(weight), riskProfile);
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
                                               LinkWeigher weigher,
                                               Map<Link, Object> riskProfile) {
diff --git a/core/net/src/test/java/org/onosproject/net/topology/impl/TopologyManagerTest.java b/core/net/src/test/java/org/onosproject/net/topology/impl/TopologyManagerTest.java
index b350144..3516058 100644
--- a/core/net/src/test/java/org/onosproject/net/topology/impl/TopologyManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/topology/impl/TopologyManagerTest.java
@@ -28,7 +28,8 @@
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.net.topology.DefaultGraphDescription;
 import org.onosproject.net.topology.GraphDescription;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
+import org.onosproject.net.topology.LinkWeigherAdapter;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyCluster;
 import org.onosproject.net.topology.TopologyEvent;
@@ -174,7 +175,7 @@
     public void onDemandPath() {
         submitTopologyGraph();
         Topology topology = service.currentTopology();
-        LinkWeight weight = edge -> 3.3;
+        LinkWeigher weight = new LinkWeigherAdapter(3.3);
 
         Set<Path> paths = service.getPaths(topology, did("a"), did("c"), weight);
         assertEquals("wrong path count", 2, paths.size());
diff --git a/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java b/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java
index c59d30d..b6e6d04 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java
@@ -41,7 +41,6 @@
 import org.onosproject.net.topology.GeoDistanceLinkWeight;
 import org.onosproject.net.topology.GraphDescription;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.MetricLinkWeight;
 import org.onosproject.net.topology.PathAdminService;
 import org.onosproject.net.topology.Topology;
@@ -74,7 +73,6 @@
 import static com.google.common.base.Preconditions.checkArgument;
 import static org.onlab.util.Tools.get;
 import static org.onlab.util.Tools.isNullOrEmpty;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 import static org.onosproject.net.topology.TopologyEvent.Type.TOPOLOGY_CHANGED;
 import static org.slf4j.LoggerFactory.getLogger;
 
@@ -165,11 +163,11 @@
         if (newLinkWeightFunction != null &&
                 !Objects.equals(newLinkWeightFunction, linkWeightFunction)) {
             linkWeightFunction = newLinkWeightFunction;
-            LinkWeight weight = linkWeightFunction.equals(LINK_METRIC) ?
+            LinkWeigher weight = linkWeightFunction.equals(LINK_METRIC) ?
                     new MetricLinkWeight() :
                     linkWeightFunction.equals(GEO_DISTANCE) ?
                             new GeoDistanceLinkWeight(deviceService) : null;
-            setDefaultLinkWeight(weight);
+            setDefaultLinkWeigher(weight);
         }
         log.info(FORMAT, linkWeightFunction);
     }
@@ -215,11 +213,6 @@
         return defaultTopology(topology).getPaths(src, dst);
     }
 
-    @Override
-    public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
-                              LinkWeight weight) {
-        return getPaths(topology, src, dst, adapt(weight));
-    }
 
     @Override
     public Set<Path> getPaths(Topology topology, DeviceId src,
@@ -249,12 +242,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                              LinkWeight weight) {
-        return getDisjointPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst, LinkWeigher weigher) {
         return defaultTopology(topology).getDisjointPaths(src, dst, weigher);
@@ -267,12 +254,6 @@
     }
 
     @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
-                                              LinkWeight weight, Map<Link, Object> riskProfile) {
-        return getDisjointPaths(topology, src, dst, adapt(weight), riskProfile);
-    }
-
-    @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst, LinkWeigher weigher,
                                               Map<Link, Object> riskProfile) {
@@ -352,11 +333,6 @@
     }
 
     @Override
-    public void setDefaultLinkWeight(LinkWeight linkWeight) {
-        DefaultTopology.setDefaultLinkWeigher(adapt(linkWeight));
-    }
-
-    @Override
     public void setDefaultLinkWeigher(LinkWeigher linkWeigher) {
         DefaultTopology.setDefaultLinkWeigher(linkWeigher);
     }
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManager.java
index a9ee2ab..f21493f 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManager.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManager.java
@@ -29,7 +29,6 @@
 import org.onosproject.net.topology.ClusterId;
 import org.onosproject.net.topology.DefaultGraphDescription;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyCluster;
 import org.onosproject.net.topology.TopologyEvent;
@@ -44,7 +43,6 @@
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.onosproject.incubator.net.virtual.DefaultVirtualLink.PID;
-import static org.onosproject.net.topology.AdapterLinkWeigher.adapt;
 
 /**
  * Topology service implementation built on the virtual network service.
@@ -139,12 +137,6 @@
 
     @Override
     public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
-                              LinkWeight weight) {
-        return getPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
-    public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
                               LinkWeigher weigher) {
         checkNotNull(src, DEVICE_ID_NULL);
         checkNotNull(dst, DEVICE_ID_NULL);
@@ -162,12 +154,6 @@
 
     @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
-                                              DeviceId dst, LinkWeight weight) {
-        return getDisjointPaths(topology, src, dst, adapt(weight));
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
                                               LinkWeigher weigher) {
         checkNotNull(src, DEVICE_ID_NULL);
@@ -187,13 +173,6 @@
 
     @Override
     public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
-                                              DeviceId dst, LinkWeight weight,
-                                              Map<Link, Object> riskProfile) {
-        return getDisjointPaths(topology, src, dst, adapt(weight), riskProfile);
-    }
-
-    @Override
-    public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src,
                                               DeviceId dst,
                                               LinkWeigher weigher,
                                               Map<Link, Object> riskProfile) {
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkPathManagerTest.java b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkPathManagerTest.java
index adfca6d..cf49106 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkPathManagerTest.java
+++ b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkPathManagerTest.java
@@ -37,7 +37,8 @@
 import org.onosproject.net.Path;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.TestDeviceParams;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigher;
+import org.onosproject.net.topology.LinkWeigherAdapter;
 import org.onosproject.net.topology.PathService;
 import org.onosproject.store.service.TestStorageService;
 
@@ -161,7 +162,7 @@
         Set<Path> paths = pathService.getPaths(DID1, DID3);
         validatePaths(paths, 1, 1, DID1, DID3, 1.0);
 
-        LinkWeight linkWeight = edge -> 2.0;
+        LinkWeigher linkWeight = new LinkWeigherAdapter(2.0);
         paths = pathService.getPaths(DID1, DID3, linkWeight);
         validatePaths(paths, 1, 1, DID1, DID3, 2.0);
 
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManagerTest.java b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManagerTest.java
index 6218a15..ed51f94 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManagerTest.java
+++ b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkTopologyManagerTest.java
@@ -42,7 +42,7 @@
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.TestDeviceParams;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
+import org.onosproject.net.topology.LinkWeigherAdapter;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyCluster;
 import org.onosproject.net.topology.TopologyService;
@@ -414,7 +414,7 @@
         assertEquals("The paths size did not match.", 1, paths.size());
 
         // test the getPaths() by weight method.
-        LinkWeight weight = edge -> 1.0;
+        LinkWeigher weight = new LinkWeigherAdapter(1.0);
         Set<Path> paths1 = topologyService.getPaths(topology, srcVirtualDevice.id(), dstVirtualDevice.id(), weight);
         assertNotNull("The paths should not be null.", paths1);
         assertEquals("The paths size did not match.", 1, paths1.size());
@@ -472,7 +472,7 @@
 
         // test the getDisjointPaths() method using a null weight.
         Set<DisjointPath> paths = topologyService.getDisjointPaths(topology, srcVirtualDevice.id(),
-                                                                   dstVirtualDevice.id(), (LinkWeight) null);
+                                                                   dstVirtualDevice.id(), (LinkWeigher) null);
     }
 
     /**
@@ -513,7 +513,7 @@
         assertEquals("The paths size did not match.", 1, paths.size());
 
         // test the getDisjointPaths() method using a weight.
-        LinkWeight weight = edge -> 1.0;
+        LinkWeigher weight = new LinkWeigherAdapter(1.0);
         Set<DisjointPath> paths1 = topologyService.getDisjointPaths(topology, srcVirtualDevice.id(),
                                                                     dstVirtualDevice.id(), weight);
         assertNotNull("The paths should not be null.", paths1);
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/provider/DefaultVirtualFlowRuleProviderTest.java b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/provider/DefaultVirtualFlowRuleProviderTest.java
index 72698ae..c157a54 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/provider/DefaultVirtualFlowRuleProviderTest.java
+++ b/incubator/net/src/test/java/org/onosproject/incubator/net/virtual/impl/provider/DefaultVirtualFlowRuleProviderTest.java
@@ -62,7 +62,6 @@
 import org.onosproject.net.flow.instructions.L2ModificationInstruction;
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.net.topology.LinkWeigher;
-import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyServiceAdapter;
 
@@ -343,14 +342,6 @@
         }
 
         @Override
-        public Set<Path> getPaths(Topology topology, DeviceId src,
-                                  DeviceId dst, LinkWeight weight) {
-            DefaultPath path = new DefaultPath(PID, ImmutableList.of(LINK1),
-                                               oneHundred, ANNOTATIONS);
-            return ImmutableSet.of(path);
-        }
-
-        @Override
         public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
                                   LinkWeigher weigher) {
             DefaultPath path = new DefaultPath(PID, ImmutableList.of(LINK1),
