blob: 6e6ef949226b2df374e139d5087a33d32167f14a [file] [log] [blame]
Jian Li95edb592017-01-29 08:42:07 +09001/*
2 * Copyright 2017-present Open Networking Laboratory
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.mapping;
17
18/**
19 * Abstraction of mapping entry.
20 */
21public interface MappingEntry extends Mapping {
22
23 enum MappingEntryState {
24
25 /**
26 * Indicates that this mapping has been submitted for addition.
27 * Not necessarily in the map database or map cache.
28 */
29 PENDING_ADD,
30
31 /**
32 * Mapping has been added which means it is either in map database or
33 * in map cache.
34 */
35 ADDED,
36
37 /**
38 * Mapping has been marked for removal, might still be either in map
39 * database or in map cache.
40 */
41 PENDING_REMOVE,
42
43 /**
44 * Mapping has been removed from map database or in map cache, and
45 * ca be purged.
46 */
47 REMOVED,
48
49 /**
50 * Indicates that the installation of this mapping has failed.
51 */
52 FAILED
53 }
54
55 /**
56 * Returns the mapping entry state.
57 *
58 * @return mapping entry state
59 */
60 MappingEntryState state();
61}