blob: 259eabe2de67298a8bd18386a22ec3cf832ac1cc [file] [log] [blame]
Jian Li95edb592017-01-29 08:42:07 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Jian Li95edb592017-01-29 08:42:07 +09003 *
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.mapping;
17
Jian Licdd1bfd2017-03-12 22:42:56 +090018import org.onosproject.core.ApplicationId;
19import org.onosproject.net.DeviceId;
20
Jian Li95edb592017-01-29 08:42:07 +090021/**
22 * Service for administering the mapping management.
23 */
24public interface MappingAdminService extends MappingService {
Jian Licdd1bfd2017-03-12 22:42:56 +090025
26 /**
27 * Stores a mapping entry.
28 *
29 * @param type mapping store type
30 * @param entry mapping entry to be stored
31 */
32 void storeMappingEntry(MappingStore.Type type, MappingEntry entry);
33
34 /**
35 * Removes the specified mapping entries from their respective devices and
36 * mapping store.
37 *
38 * @param type mapping store type
39 * @param entries one or more mapping entries
40 */
41 void removeMappingEntries(MappingStore.Type type, MappingEntry... entries);
42
43 /**
44 * Removes all mapping entries submitted by a particular application.
45 *
46 * @param type mapping store type
47 * @param appId identifier of application whose mapping entries will be removed
48 */
49 void removeMappingEntriesByAppId(MappingStore.Type type, ApplicationId appId);
50
51 /**
52 * Purges all mappings on the specified device and mapping store.
53 * Note that the mappings will only be removed from storage, the mappings
54 * are still remaining in the device.
55 *
56 * @param type mapping store type
57 * @param deviceId device identifier
58 */
59 void purgeMappings(MappingStore.Type type, DeviceId deviceId);
Jian Li95edb592017-01-29 08:42:07 +090060}