blob: 815eb3e2729a09f720569f5ec337903be31cea96 [file] [log] [blame]
Aaron Kruglikov92511f22015-10-12 14:39:04 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Aaron Kruglikov92511f22015-10-12 14:39:04 -07003 *
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 */
16
17package org.onosproject.persistence;
18
19/**
20 * Service that allows for the creation of local disk backed map for instance specific values that persist across
21 * restarts. Empty maps and sets are deleted on shutdown.
22 */
23public interface PersistenceService {
24 /**
25 * A builder for the creation of local persistent maps backed by disk.
26 *
27 * @param <K> the type of keys in this map
28 * @param <V> the type of values in this map
29 * @return a persistent map builder
30 */
31 <K, V> PersistentMapBuilder<K, V> persistentMapBuilder();
32
33 /**
34 * A builder for the creation of local persistent sets backed by disk.
35 *
36 * @param <E> the type of the elements
37 * @return a persistent set builder
38 */
39 <E> PersistentSetBuilder<E> persistentSetBuilder();
40}