blob: 38458965bc59883d4b950f62e35256e11f3c412e [file] [log] [blame]
Shravan Ambati1e8471e2016-07-13 14:03:17 -07001/**
2 * Copyright 2016 Open Networking Laboratory
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 */
15package org.onosproject.kafkaintegration.api;
16
17import 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 */
23public interface KafkaEventStorageService {
24
25 /**
26 * Inserts the Generated event into the local cache.
27 *
28 * @param e the ONOS Event
29 * @return true if the insertion was successful
30 */
31 boolean insertCacheEntry(OnosEvent e);
32
33 /**
34 * Updates the counter with the most recently published event's sequence
35 * number.
36 *
37 * @param sequenceNumber the updated value of sequence number.
38 */
39 void updateLastPublishedEntry(Long sequenceNumber);
40}