blob: b6a2021e187828f44fde4650bd1eaa7d67b4e251 [file] [log] [blame]
Jian Lidaa7d6a2021-04-13 17:22:56 +09001/*
2 * Copyright 2021-present Open Networking Foundation
3 *
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 */
16package org.onosproject.kubevirtnetworking.api;
17
18import org.onosproject.store.Store;
19
20import java.util.Set;
21
22/**
23 * Manages inventory of kubevirt load balancer states; not intended for direct use.
24 */
25public interface KubevirtLoadBalancerStore
26 extends Store<KubevirtLoadBalancerEvent, KubevirtLoadBalancerStoreDelegate> {
27
28 /**
29 * Creates a new kubevirt load balancer.
30 *
31 * @param lb kubevirt load balancer
32 */
33 void createLoadBalancer(KubevirtLoadBalancer lb);
34
35 /**
36 * Updates the kubevirt load balancer.
37 *
38 * @param lb kubevirt load balancer
39 */
40 void updateLoadBalancer(KubevirtLoadBalancer lb);
41
42 /**
43 * Removes the kubevirt load balancer with the given load balancer name.
44 *
45 * @param name load balancer name
46 * @return remove kubevirt load balancer; null if failed
47 */
48 KubevirtLoadBalancer removeLoadBalancer(String name);
49
50 /**
51 * Returns the kubevirt load balancer with the given load balancer name.
52 *
53 * @param name load balancer name
54 * @return load balancer; null if failed
55 */
56 KubevirtLoadBalancer loadBalancer(String name);
57
58 /**
59 * Returns all kubevirt load balancers.
60 *
61 * @return set of kubevirt load balancers
62 */
63 Set<KubevirtLoadBalancer> loadBalancers();
64
65 /**
66 * Removes all kubevirt load balancers.
67 */
68 void clear();
69}