blob: 905af607434237e3f0e0e85c69b73607a9c0f28c [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2014-present Open Networking Foundation
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska83e090e2014-10-22 14:25:35 -070015 */
Ray Milkey7bf273c2017-09-27 16:15:15 -070016package org.onosproject.net.flow.oldbatch;
alshabib902d41b2014-10-07 16:52:05 -070017
Ray Milkey7bf273c2017-09-27 16:15:15 -070018import org.onosproject.net.flow.BatchOperationEntry;
19import org.onosproject.net.flow.FlowRule;
20import org.onosproject.net.flow.oldbatch.FlowRuleBatchEntry.FlowRuleOperation;
alshabib902d41b2014-10-07 16:52:05 -070021
Ray Milkeyc4dd7262015-08-21 09:33:42 -070022@Deprecated
23/**
24 * @deprecated in Drake release - no longer a public API
25 */
alshabib902d41b2014-10-07 16:52:05 -070026public class FlowRuleBatchEntry
27 extends BatchOperationEntry<FlowRuleOperation, FlowRule> {
28
Sho SHIMIZUc0e8bfa2015-01-22 16:15:08 -080029 private final Long id; // FIXME: consider using Optional<Long>
Brian O'Connor427a1762014-11-19 18:40:32 -080030
alshabib902d41b2014-10-07 16:52:05 -070031 public FlowRuleBatchEntry(FlowRuleOperation operator, FlowRule target) {
32 super(operator, target);
Sho SHIMIZUc0e8bfa2015-01-22 16:15:08 -080033 this.id = null;
Brian O'Connor427a1762014-11-19 18:40:32 -080034 }
35
Sho SHIMIZUc0e8bfa2015-01-22 16:15:08 -080036 public FlowRuleBatchEntry(FlowRuleOperation operator, FlowRule target, Long id) {
Brian O'Connor427a1762014-11-19 18:40:32 -080037 super(operator, target);
Sho SHIMIZUc0e8bfa2015-01-22 16:15:08 -080038 this.id = id;
Brian O'Connor427a1762014-11-19 18:40:32 -080039 }
40
Sho SHIMIZUc0e8bfa2015-01-22 16:15:08 -080041 public Long id() {
Brian O'Connor427a1762014-11-19 18:40:32 -080042 return id;
alshabib902d41b2014-10-07 16:52:05 -070043 }
44
45 public enum FlowRuleOperation {
46 ADD,
47 REMOVE,
48 MODIFY
49 }
50
51}