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