blob: 9201c1aa8d197fe8908a82d5705ef7b41e18242b [file] [log] [blame]
Jonathan Hart96c146b2017-02-24 16:32:00 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Jonathan Hart96c146b2017-02-24 16:32:00 -08003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Ray Milkey69ec8712017-08-08 13:00:43 -070017package org.onosproject.routeservice.store;
Jonathan Hart96c146b2017-02-24 16:32:00 -080018
19import org.onlab.packet.IpAddress;
20import org.onlab.packet.IpPrefix;
Ray Milkey69ec8712017-08-08 13:00:43 -070021import org.onosproject.routeservice.Route;
22import org.onosproject.routeservice.RouteSet;
23import org.onosproject.routeservice.RouteTableId;
Jonathan Hart96c146b2017-02-24 16:32:00 -080024
25import java.util.Collection;
26import java.util.Collections;
27
28/**
29 * Route table that contains no routes.
30 */
31public final class EmptyRouteTable implements RouteTable {
32
33 private final RouteTableId id = new RouteTableId("empty");
34
35 private static final EmptyRouteTable INSTANCE = new EmptyRouteTable();
36
37 /**
38 * Returns the instance of the empty route table.
39 *
40 * @return empty route table
41 */
42 public static EmptyRouteTable instance() {
43 return INSTANCE;
44 }
45
46 private EmptyRouteTable() {
47 }
48
49 @Override
50 public void update(Route route) {
51
52 }
53
54 @Override
piere91c87f2019-10-16 16:58:20 +020055 public void update(Collection<Route> routes) {
56
57 }
58
59 @Override
Jonathan Hart96c146b2017-02-24 16:32:00 -080060 public void remove(Route route) {
61
62 }
63
64 @Override
piere91c87f2019-10-16 16:58:20 +020065 public void remove(Collection<Route> routes) {
66
67 }
68
69 @Override
Daniel Ginsburg83b76452018-06-09 01:43:59 +030070 public void replace(Route route) {
71
72 }
73
74 @Override
Jonathan Hart96c146b2017-02-24 16:32:00 -080075 public RouteTableId id() {
76 return id;
77 }
78
79 @Override
80 public Collection<RouteSet> getRoutes() {
81 return Collections.emptyList();
82 }
83
84 @Override
85 public RouteSet getRoutes(IpPrefix prefix) {
86 return null;
87 }
88
89 @Override
90 public Collection<Route> getRoutesForNextHop(IpAddress nextHop) {
91 return Collections.emptyList();
92 }
93
94 @Override
piere91c87f2019-10-16 16:58:20 +020095 public Collection<RouteSet> getRoutesForNextHops(Collection<IpAddress> nextHops) {
96 return Collections.emptyList();
97 }
98
99 @Override
Jonathan Hart96c146b2017-02-24 16:32:00 -0800100 public void shutdown() {
101
102 }
103
104 @Override
105 public void destroy() {
106
107 }
108}