blob: 1b7999c425ff67e432df915a7d652fd07db011a8 [file] [log] [blame]
Gustavo Silva29fb20e2022-05-26 09:59:54 -03001/*
2 * Copyright 2022-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.opencord.olt;
17/**
18 * Enumerates the flow status.
19 */
20public enum OltFlowsStatus {
21 /**
22 * None status.
23 */
24 NONE,
25 /**
26 * Flow is pending add.
27 */
28 PENDING_ADD,
29 /**
30 * Flow is added.
31 */
32 ADDED,
33 /**
34 * Flow is pending remove.
35 */
36 PENDING_REMOVE,
37 /**
38 * Flow is removed.
39 */
40 REMOVED,
41 /**
42 * An error occurred.
43 */
Gustavo Silva89e2f042022-08-01 09:58:04 -030044 ERROR;
45
46 /**
47 * Checks if this status means the flow is still available or in progress to be available.
48 * @return true if the status represents an available flow.
49 */
50 public boolean hasFlow() {
51 return !OltFlowsStatus.NONE.equals(this) && !OltFlowsStatus.REMOVED.equals(this);
52 }
Gustavo Silva29fb20e2022-05-26 09:59:54 -030053}