Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 1 | /** |
Brian O'Connor | 0a4e674 | 2016-09-15 23:03:10 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at |
| 6 | |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | package org.onosproject.kafkaintegration.api; |
| 16 | |
| 17 | import org.onosproject.kafkaintegration.api.dto.OnosEvent; |
| 18 | |
| 19 | /** |
| 20 | * APIs to insert and delete into a local store. This store is used to keep |
| 21 | * track of events that are being published. |
| 22 | */ |
| 23 | public interface KafkaEventStorageService { |
| 24 | |
| 25 | /** |
Shravan Ambati | a4875d8 | 2017-01-09 13:06:51 -0800 | [diff] [blame] | 26 | * Inserts the Onos Event into Distributed Work Queue. |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 27 | * |
| 28 | * @param e the ONOS Event |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 29 | */ |
Shravan Ambati | a4875d8 | 2017-01-09 13:06:51 -0800 | [diff] [blame] | 30 | void publishEvent(OnosEvent event); |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 31 | |
| 32 | /** |
Shravan Ambati | a4875d8 | 2017-01-09 13:06:51 -0800 | [diff] [blame] | 33 | * Removes the Onos Event from the Distributed Work Queue. |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 34 | * |
Shravan Ambati | a4875d8 | 2017-01-09 13:06:51 -0800 | [diff] [blame] | 35 | * @return the Onos Event |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 36 | */ |
Shravan Ambati | a4875d8 | 2017-01-09 13:06:51 -0800 | [diff] [blame] | 37 | OnosEvent consumeEvent(); |
Shravan Ambati | 1e8471e | 2016-07-13 14:03:17 -0700 | [diff] [blame] | 38 | } |